I am trying to read a GDAL VRT file.

I have included

    <!-- VRT Format (reader) -->

and I have these files:




 AbstractGridFormat format = GridFormatFinder.findFormat("...");
 GridCoverage2DReader reader = format.getReader("...");

causes Exception

Trying to get a reader from an unknown format.
java.lang.UnsupportedOperationException: Trying to get a reader from an unknown format.
    at org.geotools.coverage.grid.io.UnknownFormat.getReader(UnknownFormat.java:62)

how to enable GeoTools to find the respective VRT reader?

  • do you have imageio installed? specifically, you need it.geosolutions.imageio.plugins.vrt.VRTImageReaderSpi – Ian Turton Nov 27 '17 at 8:56
  • yes, I have it.geosolutions.imageio.plugins.vrt.VRTImageReaderSpi – Antonio Nov 27 '17 at 9:15
  • how are you building and running your app? – Ian Turton Nov 27 '17 at 9:15
  • Maven: I have included all dependecies including the gt-imageio-ext-gdal – Antonio Nov 27 '17 at 9:16
  • turn logging up to Fine - I'm seeing "java.lang.NoClassDefFoundError: Could not initialize class org.gdal.gdalconst.gdalconstConstants" – Ian Turton Nov 27 '17 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.