Question

I have a problem when I try to get object from AbstractGridCoverage2DReader. I need it to get CoordinateReferenceSystem and coverage.

File file = new File("Resource/new.tif");

AbstractGridFormat format = GridFormatFinder.findFormat(file);
System.out.println("here we have format: "+format);

AbstractGridCoverage2DReader reader = format.getReader(file);
System.out.println("here we have reader: "+reader);

Format is ok: "org.geotools.gce.geotiff.GeoTiffFormat@ed5ad5d". But reader is always NULL.

Any ideas?

Was it helpful?

Solution

ok i solved it, change the pom.xml file (i have a maven-based project).

(1): org.geotools gt-epsg-hsql ${geotools.version}

(2): org.geotools gt-epsg-hsql 2.7-M2

I changed (1) on (2) and it works fine! :).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top