Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4013794
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:24:58+00:00 2026-05-20T09:24:58+00:00

I have an array of latitude/longitude coordinate pairs that represent a polygon. I’m trying

  • 0

I have an array of latitude/longitude coordinate pairs that represent a polygon. I’m trying to determine the total area within that polygon. How would I go about doing that in Ruby?

Here’s an example array of the polygon:

[[37.7663613767094, -122.452969210084], [37.7674219449606, -122.444718340349], [37.7701838510542, -122.445330289514], [37.7709974013834, -122.439159589248], [37.7700761930893, -122.438861402472], [37.7703501163684, -122.436868738421], [37.7712650571321, -122.437078116573], [37.7736056746515, -122.437533130227], [37.7714671036087, -122.453964210266], [37.7663613767094, -122.452969210084]]
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T09:24:59+00:00Added an answer on May 20, 2026 at 9:24 am

    You can use this library which wraps GEOS (a C geospatial library itself a port of the JTS).
    https://github.com/dark-panda/ffi-geos

    This library can handle the calculations in coordinate space and takes care of the approximations.

    Depending on how much accuracy you need I would project the data first to an appropriate projection (not Mercator). Then calculate your area

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In MATLAB, I have an array of latitude and longitude pairs that represents locations
I have a Json array that contains latitude and longitude coordinates. Here's a sample:
I have an array of coordinates (latitude and longitude) in one .php script and
I have an array of coordinates (latitude and longitude) maded in this way: [0]
I'm using the Bing Maps v7 control. I have an array of latitude/longitude points.
I am geting stuck here I have array of latitude and longitude here ,
I have two Javascript functions that try to find the latitude and longitude of
I have a sorted array of doubles (latitudes actually) that relatively uniformally spread out
I'm trying to figure out how to get the most recent latitude and longitude
I have an array with NSString's in it. Some of these are latitude and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.