A free library of geodatas classes in C ++ (Lat / Lng / distance / conversion)

I am looking for a free geodatabase class library. I need to convert different formats of Latitude / Longitude values ​​(for example, here ), get the distances between lat / lng values, coordinates in a range, etc.

Google shows me several separate methods / functions in C ++, this is not a problem. Examples

What I'm looking for is a more complete / complex class library with some documents and examples. Any clues?

- Change -

LatLong is such a library in Javascript: http://www.movable-type.co.uk/scripts/latlong.html
Also check (C ++): http://geographiclib.sourceforge.net/html/annotated.html

- Change 2 -

The transformation approach below is a good starter, however, if there are other large libraries, please let me know. Thanks to everyone who contributed.

+4
source share
1 answer

proj4 is what you are looking for. This is a serious mapping tool, a mature and well respected projection api. It is mainly popular for direct and inverse transformations between geographical coordinates (lat / lng) and planar (x, y). The geometry of coordinates with planar coordinates is much simpler than with geographic coordinates.

The documentation is not the best. Since it can also be used as a standalone program, I would start reading the man page to get an introduction. Command line switches are the same parameters that are used to initialize the structure when using api. Then read the api docs - the function calls listed in the API Basic Functions section can be very useful.

Change with what was started as a comment on the OP: Projecting on planar coordinates is attractive for many reasons: the coordinates are compared in linear units rather than angular. Distance becomes a trivial calculation of the hypotenuse. Axis-oriented rectangles are intuitive to use. Elementary rectangular trigonometry can be used to calculate new points, for example. in the middle, offset, etc. It is all provided that the extents of a region are not massive, for example. continental scale. If your dataset is within a power square (which is still large), you'll be fine with this approach.

+5
source

All Articles