Hello- I am trying to create a simple map and save it to a jpeg file. I
found this tutorial on how to save a MapContent to an image:
http://docs.geotools.org/latest/userguide/library/render/gtrenderer.html
As a test, I did something simple like this:
MapContent map = new MapContent();
map.setTitle("World");
map.addLayer(getGraticules());saveImage(map, "/temp/graticules.jpg", 800);
Works great! However, now I want to reproject the map and clip it to a specific
AOI. Ideally, I was hoping for something like:
map.setBounds(envelope);
map.setCoordinateReferenceSystem(crs);
...but of course these methods don't exist in the MapContent class. Instead, I
see those methods implemented in the MapViewport. Is that what I should use to
reproject and clip the map? Or do I need to reproject and clip individual
layers before I add them to the map?
Thanks in advance,Peter
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users