Ahh. Sorry, that is a bug. Thanks for finding that. In the case of
Shapefiles you should get a 1-1 relationship. (WMSs are a different
story). I'll fix the problem now and new nightly build should be out
pronto.
I'll email when I commit the next nightly after that will have it.
Jesse
On 22-Mar-06, at 4:20 PM, Christopher Hammack wrote:
That does help, and I have been looking at #1 today. However, I
noticed there does not appear to be a 1 to 1 relationship for
Renderers to Layers (in my case anyhow). For example, the same
georesource URL for my shapefile seems to be mapped to both a
TiledRenderer and a BasicFeatureRenderer (both are returned by
getRenderers()). This may be elementary, but it's not clear to me
why this is or which one I should use to actually obtain an image
of the shapefile.
Thanks,
-cnh
On Mar 22, 2006, at 6:10 PM, Jesse Eichar wrote:
There are 2 ways right now.
1. The renderer API has a render( graphics2d ); method that will
render that layer to the graphics2D object. You can get a
renderer from the RenderManager.getRenderers(). You can create
your own BufferedImage. Create a graphics2D from it and render to
that image. This is the recommended method.
2. The second way is to call renderer.getContext().getImage().
For this version and the previous version this will return the
last rendering of the layer. But this is not guaranteed to do so
in future versions. We have has some complaints about the amount
of memory a separate buffered image for renderer takes up. So we
will probably add different configurations that do not do the
caching.
Hope this helps,
Jesse
On 22-Mar-06, at 3:59 PM, Christopher Hammack wrote:
I've been getting the raw Image object (BufferedImages) from Maps
for
use in export to other mediums.
Is there a way to get images of individual layers (e.g. if I have a
shapefile layer and a raster layer, and I want the image of the
shapefile layer only)? As a workaround, I can create separate
maps for
each layer, but that is not ideal.
Thanks!
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel