Hi everybody, I'am a newbie in using Geotools and I have the following problem:
I need to "vectorize" polygons from black & white raster in 'test.tif' format.
I was trying to follow those documentations: - http://docs.geotools.org/latest/userguide/library/coverage/grid.html - http://docs.geotools.org/latest/javadocs/ When I open my tif in qgis, it says that the projection is: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs Nevertheless with:final File file = new File("/home/jirka/hibernate-spatial/event-tutorial/test.tif");
AbstractGridFormat format = GridFormatFinder.findFormat(file); AbstractGridCoverage2DReader reader = format.getReader(file); I just get:Exception in thread "main" java.lang.UnsupportedOperationException: Trying to get a reader from
an unknown format.at org.geotools.coverage.grid.io.UnknownFormat.getReader(UnknownFormat.java:62)
at event.App.main(App.java:42)When following the tests (http://svn.osgeo.org/geotools/trunk/modules/plugin/geotiff/src/test/java/org/geotools/gce/geotiff/GeoTiffReaderTest.java) and trying: final File file = new File("/home/jirka/hibernate-spatial/event-tutorial/test.tif");
// hint for CRS
CoordinateReferenceSystem crs = CRS.decode("EPSG:4326", true);
final Hints hint = new Hints();
hint.put(Hints.DEFAULT_COORDINATE_REFERENCE_SYSTEM, crs);
// getting a reader
GeoTiffReader reader = new GeoTiffReader(file, hint);
I get:
Exception in thread "main" org.geotools.data.DataSourceException: Raster
to Model
Transformation is not available at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:228) at event.App.main(App.java:37)Caused by: org.geotools.data.DataSourceException: Raster to Model Transformation is not
available at org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(GeoTiffReader.java:385) at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:215) ... 1 more My maven dependencies settings are: <dependency> <groupId>org.geotools</groupId> <artifactId>gt-process</artifactId> <version>8.0-M1</version> </dependency> <dependency> <groupId>org.geotools</groupId> <artifactId>gt-geotiff</artifactId> <version>8.0-M1</version> </dependency> <dependency> <groupId>org.geotools</groupId> <artifactId>gt-image</artifactId> <version>8.0-M1</version> </dependency> <dependency> <groupId>org.geotools</groupId> <artifactId>gt-coverage</artifactId> <version>8.0-M1</version> </dependency> <dependency> <groupId>org.geotools</groupId> <artifactId>gt-epsg-hsql</artifactId> <version>8.0-M1</version> </dependency>Could anybody give me some hint (workaround) how to get this tif (probably with not properly set metadata information) vectorized?
Thank you very much, for any piece of information, Jiri Novak
<<attachment: test.tif>>
------------------------------------------------------------------------------ Magic Quadrant for Content-Aware Data Loss Prevention Research study explores the data loss prevention market. Includes in-depth analysis on the changes within the DLP market, and the criteria used to evaluate the strengths and weaknesses of these DLP solutions. http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
