I am creating plots (ContourPlot, SmoothDensityHistogram, etc.) that I then need to project onto geographic polygons. When this is done with GeoStyling[{"GeoImage", _}] the images are projected onto GeoGraphics polygons have greatly reduced image quality to the actual plots.

How can the quality of the image in GeoGraphics be specified?

Minimal example:

adOK = AdministrativeDivisionData[{"Oklahoma", "UnitedStates"}];
geoBounds = Round[GeoBounds[adOK], .1];

cp = ContourPlot[Cos[long] + Cos[lat], 
  Evaluate[Sequence @@ Reverse@MapThread[Prepend, {geoBounds, {lat, long}}]], 
  AspectRatio -> Divide @@ Reverse@Apply[Subtract, Reverse[geoBounds, {1, 2}], 2],
  Frame -> None, PlotRangePadding -> None, ImagePadding -> None]

enter image description here

GeoGraphics[{EdgeForm[Gray], Gray, GeoStyling[{"GeoImage", cp}], adOK["Polygon"]}, 
  GeoBackground -> None, GeoRangePadding -> None]

enter image description here

As you can see above the quality of the image in the GeoGraphics is many times lower than the image quality of the plot. How can the quality of the image in GeoGraphics be specified?

  • 1
    Why not preprocess cp with Rasterize[]? – J. M. is computer-less Jul 14 '16 at 13:55
  • @J.M. Yup. That will do it. 0_o – Edmund Jul 14 '16 at 14:44

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.