Export to GitHub

sextante - issue #4

Bad assignment of the envelope of a new GTRasterLayer


Posted on Jan 9, 2015 by Grumpy Camel

When a new GTRasterLayer is created in the method 'GTRasterLayer::create()', its Envelope is calculated from the AnalysisExtent parameter.

The 'AnalysisExtent::getHeight()' return the Zrange of the Extent, then the envelope misses the ymax member.

See...

https://code.google.com/p/sextante/source/browse/trunk/soft/bindings/geotools_bindings/src/es/unex/sextante/geotools/GTRasterLayer.java#58

This code fixes the bug...

double width = ge.getXMax() - ge.getXMin(); double height = ge.getYMax() - ge.getYMin(); final Envelope envelope = new Envelope2D((CoordinateReferenceSystem) crs, ge.getXMin(), ge.getYMin(), width, height);

Best Regards Alvaro

Status: New

Labels:
Type-Defect Priority-Medium