Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #15701

Polygon projection in CountryData incorrect?

From "Sjoerd C. de Vries" <sjoerd.c.devries@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Polygon projection in CountryData incorrect?
Date 2011-02-09 07:10 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <iitekr$jj7$1@smc.vnet.net> (permalink)

Show all headers | View raw


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

Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Polygon projection in CountryData incorrect? "Sjoerd C. de Vries" <sjoerd.c.devries@gmail.com> - 2011-02-09 07:10 +0000
  Re: Polygon projection in CountryData incorrect? "Sjoerd C. de Vries" <sjoerd.c.devries@gmail.com> - 2011-02-11 09:17 +0000
  Re: Polygon projection in CountryData incorrect? Heike Gramberg <heike.gramberg@gmail.com> - 2011-02-10 10:21 +0000

csiph-web