Please, provide a test image with same sample code to test the issue
and hopefully fix it :-)



Simone.

On 8/23/07, Tim Englich <[EMAIL PROTECTED]> wrote:
> Hello Martin
>
> thanks for your quick response.
>
> The Transformation works. But when I try to use the Image, which I can get
> with coverage.getRenderedImage(), e.g encoding the Image or draw it to an
> graphics like this (drawRenderedImage(RenderedImage,
> AffineTransform.getTranslateInstance(0,0));)  I got the following Exception:
>
> java.lang.NullPointerException
>        at
> com.sun.media.jai.iterator.RandomIterFallback.makeCurrent(RandomIterFallback.
> java:110)
>        at
> com.sun.media.jai.iterator.RandomIterFallback.getSample(RandomIterFallback.ja
> va:117)
>        at
> com.sun.media.jai.opimage.WarpNearestOpImage.computeRectInt(WarpNearestOpImag
> e.java:362)
>        at
> com.sun.media.jai.opimage.WarpNearestOpImage.computeRect(WarpNearestOpImage.j
> ava:108)
>        at javax.media.jai.WarpOpImage.computeTile(WarpOpImage.java:577)
>        at
> com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:90
> 4)
>        at javax.media.jai.OpImage.getTile(OpImage.java:1129)
>        at javax.media.jai.RenderedOp.getTile(RenderedOp.java:2257)
>        at
> sun.java2d.SunGraphics2D.drawTranslatedRenderedImage(SunGraphics2D.java:2542)
>        at
> sun.java2d.SunGraphics2D.drawRenderedImage(SunGraphics2D.java:2429)
>        ...
>
> Do you have an idea how to solve this problem?
>
> Thanks a lot
> Tim
>
> -----Ursprüngliche Nachricht-----
> Von: Martin Desruisseaux [mailto:[EMAIL PROTECTED]
> Gesendet: Donnerstag, 23. August 2007 12:56
> An: Tim Englich
> Cc: [email protected]
> Betreff: Re: [Geotools-gt2-users] Image Transformation form one CRS to
> an other
>
>
> Tim Englich a écrit :
> >> I am looking for a possibility to transform an georefrenced image to an
> >> other coordinatereferencesystem.
> >> E.g. from EPSG:4326 to EPSG:32632
> >> Provide GeoTools such a functionality? Do anyone know a (Java)-library
> >> which can do that.
>
> CoordinateReference sourceCRS = CRS.decode("EPSG:4326");
> CoordinateReference targetCRS = CRS.decode("EPSG:32632");
> RenderedImage image = ...
> Envelope imageEnvelope = ...
> imageEnvelope.setCoordinateReferenceSystem(sourceCRS);
> GridCoverage2D coverage = coverageFactory.create("My coverage", image,
> envelope);
> coverage = Operations.DEFAULT.resample(coverage, targetCRS);
>
>
>        Martin
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>


-- 
-------------------------------------------------------
Eng. Simone Giannecchini
President /CEO GeoSolutions S.A.S.
Via Carignoni 51
55041  Camaiore (LU)
Italy

phone: +39 0584983027
fax:      +39 0584983027
mob:    +39 333 8128928


http://www.geo-solutions.it

-------------------------------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to