Polygon projection in CountryData incorrect?
- To: mathgroup at smc.vnet.net
- Subject: [mg116270] Polygon projection in CountryData incorrect?
- From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
- Date: Wed, 9 Feb 2011 02:10:26 -0500 (EST)
CountryData contains a polygon for every country. It can be output in various projections using a specification like {"Polygon", "Mercator"}. However, the resulting polygon doesn't seem to be consistent with a transformation using GeoGridPosition and GeoPosition. If I plot Amsterdam using its CityData coordinates transformed with a Mercator projection it falls outside the Netherland's borders (1st example below). When I use the alternative approach (2nd example) everything seems OK. Am I doing something wrong or is this a bug? Graphics[ { {FaceForm[], EdgeForm[Black], CountryData["Netherlands", {"Polygon", "Mercator"}]}, Red, PointSize[0.02], Point@GeoGridPosition[ GeoPosition[ CityData[{"Amsterdam", "NoordHolland", "Netherlands"}, "Coordinates"]], "Mercator"][[1]] } ] Graphics[ { {FaceForm[], EdgeForm[Black], Polygon[Map[GeoGridPosition[GeoPosition[#], "Mercator"][[1]] &, CountryData["Netherlands", "Coordinates"], {2}]]}, Red, PointSize[0.02], Point@GeoGridPosition[ GeoPosition[ CityData[{"Amsterdam", "NoordHolland", "Netherlands"}, "Coordinates"]], "Mercator"][[1]] } ] Cheers -- Sjoerd