The answer to this question (121161) increases a map's resolution by increasing the GeoZoomLevel. I need to keep the GeoZoomLevel at the current value but increase the image quality of the tile. That is, keep the same tile image (no additional details from geo-zooming) but have that tile image at a higher quality.

For example,

GeoGraphics[{Entity["City", {"Champaign", "Illinois", "UnitedStates"}]}, 
 GeoRangePadding -> Quantity[30, "Kilometers"], 
 GeoZoomLevel -> 8]

Mathematica graphics

As mentioned above, I want to keep the same GeoZoomLevel but increase the image quality of the tiles so that the map is not pixelated.

The GeoServer option has the "TileSize" option and the "TileDataType" option. I have tried adjusting these to increase the image quality and they appear to have no effect. The documentation has no details on the file types that "TileDataType" will accept and increasing the "TileSize" does not produce a higher quality tile image. I tried all of the Vector Graphics Formats for "TileDataType" and have tried 512, 1028, and 2056 for "TileSize".

 GeoGraphics[{Entity["City", {"Champaign", "Illinois", "UnitedStates"}]}, 
  GeoRangePadding -> Quantity[30, "Kilometers"], 
  GeoZoomLevel -> 8, 
  GeoServer -> {Automatic, 
   "TileDataType" -> "EMF", 
   "TileSize" -> 512}

Mathematica graphics

However, the image quality is unaffected. How do I increase tile image quality at a given GeoZoomLevel?

  • $\begingroup$ Increasing the GeoZoomLevel is the only way I know of to accomplish what you're asking for here. You've already specified the geographic range you want, so increasing the GeoZoomLevel will increase the resolution of the map. Is there a reason you don't want to change the GeoZoomLevel? $\endgroup$ – Texas Red Jul 17 '17 at 22:20
  • $\begingroup$ @TexasRed I need to keep the detail provided by a specific GeoZoomLevel but get the tiles in a higher image quality. $\endgroup$ – Edmund Jul 18 '17 at 11:53
  • 1
    $\begingroup$ This is a problem I've also battled with and given up. The issue is how to improve the map resolution (e.g. dpi) of a given map, not the level of detail, which is what GeoZoomLevel appears to influence. Unfortunately, I think it may be a frustrating limitation at present. Whilst the image resolution is often satisfactory for viewing on screen, I've found it very poor in print format. Hopefully, this will be improved as the mapping tools are otherwise very good. $\endgroup$ – Ian Aug 2 '17 at 19:14

I'm not sure how exactly to solve your issue, but I identified the function that pulls the tiles. It's GIS`FetchGeoTiles.

You can get more tiles by increasing its "Zoom" parameter (which is no different from GeoZoomLevel in the end):

DynamicModule[{$cache = <||>},
    $cache[zoom] =
      "GeoRange" -> {{21.727635404999997`, 
         25.469835295`}, {119.936502945`, 122.103983755`}}, 
      "Zoom" -> zoom,
      "ImageSize" -> 1000,
      "GeoServer" -> {Automatic["Mercator", "Earth", "StreetMap"]}
  {zoom, 1, 15, 1}

But it doesn't exactly improve the detail. And if we trace back why, we find it comes from:

GIS`TilesToURLs[{{7, 66, 44}, {7, 67, 44}, {7, 66, 45}, {7, 67, 
   45}}, {Automatic["Mercator", "Earth", "StreetMap"]}]

{"http://geo.wolfram.com/earth/streetmap/merc/7/66/44.png", \
"http://geo.wolfram.com/earth/streetmap/merc/7/67/44.png", \
"http://geo.wolfram.com/earth/streetmap/merc/7/66/45.png", \

Note that you can only access those by:

 GIS`TilesToURLs[{{7, 66, 44}, {7, 67, 44}, {7, 66, 45}, {7, 67, 
    45}}, {Automatic["Mercator", "Earth", "StreetMap"]}],
 {Automatic["Mercator", "Earth", "StreetMap"]}

as it calls

   GIS`GeoServerDump`ConnectionMethod, GIS`ConnectionOptions, 
    "Earth", "StreetMap"]}]

to access the license info

Maybe trying a different server would work, but I dunno how to go about doing that.

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.