|
Geometry : |
Subject: [ggl] map to cartesian
From: Barend Gehrels (Barend.Gehrels)
Date: 2010-03-30 08:15:21
Hi Fausto,
fausto wrote:
> Hi Barend, all,
> regarding transformations from one coordinate system to another, I can
> see that the example below mentions Map projectons.
> http://geometrylibrary.geodan.nl/06__transformation__example_8cpp-example.html
>
> Is there a way to transform GIS positions into simple cartesian x,y
> positions.
>
> If you were to draw a country loaded from a kml file or shapefile, how
> would you proceed?
> I guess you need to transform the lat/long vertex positions into x,y
> and apply the polygon geometry for each set of x,y pairs.
> How ggl can help in this context?
Sure this is possible.
See
<https://svn.boost.org/svn/boost/sandbox/geometry/libs/geometry/example/extensions/gis/projections/p03_projmap_example.cpp>
which, in this case, reads from WKT (world countries), project the
countries using the Mollweide Map Projection and outputs to SVG.
> I guess it's also possible to use the simplification functions
> provided with ggl in this context, right?
Yes, you can use them as well, either the lat-long coordinates, or the
projected coordinates, or the coordinates in SVG-coordinate system.
Regards, Barend
Geometry list run by mateusz at loskot.net