twpayne / go-geom

Package geom implements efficient geometry types for geospatial applications.
BSD 2-Clause "Simplified" License
839 stars 104 forks source link

Support for GPS point calculation? #227

Closed luoyh22 closed 1 year ago

luoyh22 commented 1 year ago

As there is SRID item for geom objector, I think the functions such as Length, Intersect etc. should support the (longitude, latitude) format geoms. What I expect is calculate the distance between two points in planer as (longitude, latitude) format, in Plane not Spherical. Do you have the plan for this feature?

twpayne commented 1 year ago

No. This is specifically out-of-scope for go-geom.

go-geom specifically a low-level library for representing geometries. It maintains the SRID of geometries for ease of integration with GIS systems.

The distance, area, etc. calculations depend on the projection used and the application's need. In many cases, the calculations are extremely complex. For this, I recommend using PROJ. I have written Go bindings for PROJ at github.com/twpayne/go-proj.