Message Boards Message Boards

GeoGraphics, non-rectangular imagesize

Dear All,

I would like to show some geo-graphics, but I'd like to create an image of some specific dimensions, so I tried:

GeoGraphics[Entity["Country", "Netherlands"], ImageSize -> {500, 800}]

enter image description here

This gives me a 500*500 square map, with 150 pixels white pixels on top and bottom. Is there an easy way to force this to be also a 'map' ?

POSTED BY: Sander Huisman
2 Replies

Though you are completely correct, it is very cumbersome; because you want to size your plot in general. I don't want the find the exact georange such as to get a 500*800 image.

Giving an image-size, and geocenter, and a georange (in meters for example) should be enough to give me an image that fits (at least) this range).

POSTED BY: Sander Huisman

I believe that what GeoGraphics is doing here is maintaining the GeoProjection while allowing you to increase the ImageSize of the Graphics bounding area that it is being placed in. If it were to stretch the map in the vertical direction then it would alter the GeoProjection that it is using: so it overrides that. To fill more of the area you would need to increase the amount of physical earth surface that GeoGraphics is plotting. To do this you use GeoRange as in

GeoGraphics[Entity["Country", "Netherlands"], 
 GeoRange -> {{52.5 - 2, 52.5 + 2}, Automatic}]

enter image description here

POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract