Hi Simone,
Noticed this request for help on the user list, since 2.3.x is the first
release with useful grid coverage support I thought you may want a crack
at the upgrade problem?
My best guess would be to supply a good "prj" file using WKT generated
from the epsg-hsql plug-in ... and then try again.
Jody
Gabriella Turek wrote:
> I've tried to recompile my 2.2 code to 2.3_M0 and it does not (not
> unexpected), so I've been trying to modify my code to make it work, but
> I've had no success.
>
> With 2.2 I was able to plot georeferenced images, shape files and
> features in a CSV table even though, strangely enough, I get
> the error:
>
> SEVERE: Data source and map context coordinate system differ, yet it was
> not possible to get a projected bounds estimate...
> org.opengis.referencing.operation.OperationNotFoundException: Bursa wolf
> parameters required
>
> even though everything seems to plot correctly.
>
> For 2.3_MO I am not having any luck. What is no longer working is the
> plotting of the georeferenced images, which in 2.2 I did via
>
> URL imgURL = (new File("data/nz2_2.jpg")).toURL();
> GridCoverage gc = wir.read(null);
> CoordinateReferenceSystem crs = gc.getCoordinateReferenceSystem();
> crs = CRS.decode("EPSG:27200");
>
> and in 2.3_M0 I must do via:
>
> BufferedImage image = ImageIO.read(new File("data/nz2_2.jpg"));
> WorldFile wf = new WorldFile(new File("data/nz2_2.jgw"));
> WritableRaster wr = image.getRaster();
> GeneralEnvelope envelope = new GeneralEnvelope(new
> Rectangle2D(wr.getBounds());
> GridCoverageFactory factory =
> org.geotools.coverage.FactoryFinder.getGridCoverageFactory(null);
> GridCoverage2D gc = factory.create("Map", wr, envelope);
> CoordinateReferenceSystem crs = CRS.decode("EPSG:27200");
> gc = factory.create(gc.getName(), gc.getRenderedImage(),
> crs, gc.getGridGeometry().getGridToCoordinateSystem(),
> gc.getSampleDimensions(), null, null);
>
> In this case I get
> Oct 10, 2006 3:37:21 PM StreamingRenderer processStylers
> SEVERE: null
> java.lang.NullPointerException
> at com.vividsolutions.jts.geom.Envelope.init(Envelope.java:254)
> at com.vividsolutions.jts.geom.Envelope.<init>(Envelope.java:186)
> at
> org.geotools.geometry.jts.ReferencedEnvelope.<init>(ReferencedEnvelope.java:112)
> at
> org.geotools.renderer.lite.gridcoverage2d.GridCoverageRenderer.<init>(GridCoverageRenderer.java:158)
> at StreamingRenderer.renderRaster(StreamingRenderer.java:1717)
> at StreamingRenderer.processSymbolizers(StreamingRenderer.java:1578)
> at StreamingRenderer.process(StreamingRenderer.java:1522)
> at StreamingRenderer.processStylers(StreamingRenderer.java:1464)
> at StreamingRenderer.paint(StreamingRenderer.java:529)
> at StreamingRenderer.paint(StreamingRenderer.java:393)
> at JMapPane.paintComponent(JMapPane.java:396)
> at javax.swing.JComponent.paint(JComponent.java:1005)
> at javax.swing.JComponent.paintChildren(JComponent.java:842)
> etc, etc
>
> Nothing gets plotted, and more over the scale of what gets plotted (data
> from the shapefiles) seems to be all wrong.
>
> Any ideas? Thanx
> gaby
>
>
> --
> ***************************************************************
> ** Gabriella Turek [EMAIL PROTECTED] **
> ** National Institute of Water & Atmospheric Research (NIWA) **
> ** PO Box 8602 Christchurch New Zealand +64-3-348-8987x3724 **
> ***************************************************************
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users