[udig-devel] How to get a GridCoverage2D object from a layer
Jesse Eichar
jeichar at refractions.net
Sun Aug 27 10:05:11 PDT 2006
Hi,
In the case where the layer represents a WMS you will actually have
to go through the work of making the request to the WMS and creating
a GridCoverage from the resulting image. Take a look at the code in
BasicWMSRenderer2 for how to do this:
http://svn.geotools.org/udig/branches/1.0.x/plugins/
net.refractions.udig.render.wms.basic/src/net/refractions/udig/render/
internal/wms/basic/BasicWMSRenderer2.java
Jesse
On 27-Aug-06, at 3:57 AM, Benedikt Arnold wrote:
> Hi,
>
> @Cory
> Thank you for your help, but this didn't work. That was the first
> thing I tried before I ask the list :-)
> The gc2d object is null everytime.
>
> I'll try to describe my problem a bit more. The data comes from a
> web map server. I know, that I have to use GridCoverage2D because
> the wms renderer used it too.
>
> I am currently using uDig 1.0.6 on OSX
>
> Greetings,
> Benedikt
>
>
>
> Am 17.08.2006 um 01:37 schrieb Cory Horner:
>
>> Benedikt Arnold wrote:
>>
>>> I want to write a Plugin, which will work with raster data. My
>>> question is how to get a GridCoverage2D object from an ILayer
>>> object?
>>
>> Hi Benedikt,
>>
>> Try:
>>
>> list = iLayer.getGeoResources();
>> ...
>> gc2d = (GridCoverage2D) geoResource.resolve(GridCoverage2D.class,
>> null);
>>
>> Cheers,
>> Cory.
>> _______________________________________________
>> 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
More information about the udig-devel
mailing list