0
$\begingroup$

It's been rather smooth progress lately using GeoGraphics as I attempt to render different polygons over the greater metropolitan Vancouver area. I found this answer helpful in digging deeper into the problem but still haven't found a solution that works for Polygon. I have 26 similar polygons in the follow {x,y} form:

{{-123.023,49.2946},{-123.039,49.2957},{-123.039,49.2957},{-123.067,49.2977},{-123.102,49.3008},{-123.103,49.3011},{-123.127,49.3082},{-123.13,49.31},{-123.137,49.3145},{-123.141,49.3166},{-123.164,49.3166},{-123.164,49.282},{-123.184,49.282},{-123.222,49.2819},{-123.224,49.2781},{-123.224,49.2774},{-123.224,49.2771},{-123.224,49.2766},{-123.224,49.2757},{-123.225,49.2748},{-123.225,49.2747},{-123.225,49.274},{-123.225,49.2736},{-123.225,49.2728},{-123.225,49.2727},{-123.224,49.2722},{-123.224,49.272},{-123.223,49.2715},{-123.222,49.2709},{-123.222,49.2703},{-123.222,49.2699},{-123.222,49.2696},{-123.222,49.2692},{-123.222,49.2689},{-123.222,49.2687},{-123.22,49.269},{-123.22,49.2687},{-123.22,49.2684},{-123.22,49.268},{-123.22,49.2672},{-123.219,49.2672},{-123.219,49.2673},{-123.218,49.2673},{-123.218,49.2673},{-123.217,49.2674},{-123.217,49.2674},{-123.217,49.2674},{-123.216,49.2674},{-123.216,49.2674},{-123.215,49.2674},{-123.215,49.2674},{-123.215,49.2583},{-123.203,49.2583},{-123.203,49.2574},{-123.203,49.2566},{-123.201,49.2566},{-123.198,49.2565},{-123.197,49.2565},{-123.197,49.2503},{-123.197,49.2503},{-123.198,49.2503},{-123.199,49.2503},{-123.201,49.2502},{-123.202,49.25},{-123.203,49.2497},{-123.205,49.2494},{-123.205,49.2491},{-123.202,49.2477},{-123.201,49.2472},{-123.199,49.2463},{-123.198,49.2463},{-123.198,49.2463},{-123.197,49.2462},{-123.197,49.2428},{-123.197,49.2387},{-123.197,49.2385},{-123.197,49.2385},{-123.198,49.2385},{-123.198,49.2385},{-123.199,49.2384},{-123.199,49.2378},{-123.199,49.2368},{-123.199,49.2366},{-123.198,49.2366},{-123.198,49.2366},{-123.197,49.2366},{-123.197,49.2366},{-123.197,49.2355},{-123.197,49.2352},{-123.197,49.235},{-123.205,49.2374},{-123.206,49.2371},{-123.207,49.2361},{-123.209,49.2352},{-123.22,49.2396},{-123.22,49.2395},{-123.221,49.2376},{-123.221,49.2375},{-123.222,49.2371},{-123.224,49.2342},{-123.221,49.2333},{-123.221,49.2332},{-123.221,49.233},{-123.219,49.2326},{-123.215,49.2304},{-123.213,49.2293},{-123.213,49.229},{-123.212,49.2286},{-123.211,49.228},{-123.21,49.2274},{-123.21,49.2272},{-123.21,49.227},{-123.21,49.2266},{-123.21,49.2262},{-123.209,49.2251},{-123.209,49.225},{-123.209,49.2246},{-123.208,49.2243},{-123.202,49.2215},{-123.202,49.2214},{-123.197,49.2205},{-123.191,49.2195},{-123.185,49.2167},{-123.18,49.2158},{-123.172,49.2151},{-123.164,49.2134},{-123.159,49.2115},{-123.152,49.206},{-123.151,49.2053},{-123.149,49.2049},{-123.147,49.2044},{-123.145,49.2036},{-123.143,49.2028},{-123.141,49.2015},{-123.14,49.2004},{-123.138,49.1996},{-123.137,49.1992},{-123.135,49.1988},{-123.133,49.1987},{-123.132,49.1988},{-123.13,49.1988},{-123.125,49.2004},{-123.121,49.2019},{-123.12,49.2023},{-123.118,49.2031},{-123.114,49.2045},{-123.111,49.2047},{-123.106,49.2045},{-123.103,49.2043},{-123.1,49.2043},{-123.096,49.2044},{-123.094,49.2047},{-123.091,49.2053},{-123.083,49.207},{-123.08,49.2076},{-123.077,49.2081},{-123.075,49.2084},{-123.072,49.2079},{-123.07,49.2073},{-123.069,49.2067},{-123.067,49.2058},{-123.066,49.2052},{-123.056,49.2043},{-123.042,49.2039},{-123.038,49.2026},{-123.024,49.1997},{-123.024,49.2018},{-123.023,49.2041},{-123.023,49.2059},{-123.024,49.2082},{-123.024,49.21},{-123.024,49.2104},{-123.024,49.2125},{-123.024,49.2164},{-123.024,49.2219},{-123.023,49.2235},{-123.024,49.2323},{-123.024,49.244},{-123.024,49.2448},{-123.024,49.245},{-123.024,49.2582},{-123.024,49.2786},{-123.023,49.2811},{-123.023,49.2946}}

GeoPostion and GeoGridPosition all work as expected on lists of {x,y} coordinates, however the final GeoGraphics rendering of polygons was incorrectly placed hundreds of miles to the south-east over Eugene WA. Trying to fix it I thought would be as simple as adding the GeoProjection -> "Mercator" option however that failed. Does anyone have any suggestions where to investigate next so the rendering is no longer skewed and information marred? What explains this behaviour?

Table[
 GeoGraphics[
   listOfPolygons,
  ImageSize -> 500,
  GeoRangePadding -> Quantity[10, "km"],
  GeoBackground -> "StreetMap",
  GeoProjection -> x,
  PlotLabel -> Style[x <> " Projection", Large],
  ImagePadding -> 10
  ], {x, {"Equirectangular", "Mercator"}}
 ]
$\endgroup$
6
  • $\begingroup$ What is geometryArrayB? What do you mean by "squished"? $\endgroup$ Oct 16, 2020 at 14:19
  • $\begingroup$ You're right. That's probably poor variable naming. It's a list of 26 GeoPolygons in the {x,y} shown above. $\endgroup$
    – BBirdsell
    Oct 17, 2020 at 1:13
  • $\begingroup$ With the single list provided assigned to points the following plots it. What do you mean by "squished"? GeoGraphics[{EdgeForm[Black], FaceForm@Red, Polygon@GeoPosition@(Reverse /@ points)}, ImageSize -> 500, GeoRangePadding -> Quantity[10, "km"], GeoBackground -> "StreetMap", GeoProjection -> #, PlotLabel -> Style[# <> " Projection", Large], ImagePadding -> 10] & /@ {"Equirectangular", "Mercator"} $\endgroup$ Oct 17, 2020 at 1:49
  • $\begingroup$ You're right again. "squished" probably isn't the best description. I'm alarmed the mercator projection incorrectly places the polygons to the south. $\endgroup$
    – BBirdsell
    Oct 17, 2020 at 2:07
  • $\begingroup$ Just checking, I don't have access to Mathematica at the moment, it's not something simple like the coordinates being reversed (x,y rather than y,x?) $\endgroup$
    – Carl Lange
    Oct 17, 2020 at 12:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.