-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move GDAL GeoTiff reader to adapter so that it can be used for comman…
…dline ingest
- Loading branch information
Showing
9 changed files
with
209 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ve/format/landsat8/GDALGeoTiffFormat.java → ...pter/raster/plugin/GDALGeoTiffFormat.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...er/src/main/java/mil/nga/giat/geowave/adapter/raster/plugin/GDALGeoTiffFormatFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package mil.nga.giat.geowave.adapter.raster.plugin; | ||
|
||
import java.awt.RenderingHints.Key; | ||
import java.util.Map; | ||
|
||
import org.geotools.coverage.grid.io.AbstractGridFormat; | ||
import org.geotools.coverageio.BaseGridFormatFactorySPI; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
import it.geosolutions.imageio.plugins.geotiff.GeoTiffImageReaderSpi; | ||
|
||
public class GDALGeoTiffFormatFactory extends | ||
BaseGridFormatFactorySPI | ||
{ | ||
private final static Logger LOGGER = LoggerFactory.getLogger(GDALGeoTiffFormatFactory.class); | ||
|
||
@Override | ||
public boolean isAvailable() { | ||
boolean available = true; | ||
|
||
// if these classes are here, then the runtime environment has | ||
// access to JAI and the JAI ImageI/O toolbox. | ||
try { | ||
Class.forName("it.geosolutions.imageio.plugins.geotiff.GeoTiffImageReaderSpi"); | ||
available = new GeoTiffImageReaderSpi().isAvailable(); | ||
|
||
} | ||
catch (final ClassNotFoundException cnf) { | ||
if (LOGGER.isDebugEnabled()) { | ||
LOGGER.debug("GDALGeoTiffFormatFactory is not availaible."); | ||
} | ||
|
||
available = false; | ||
} | ||
|
||
return available; | ||
} | ||
|
||
@Override | ||
public AbstractGridFormat createFormat() { | ||
return new GDALGeoTiffFormat(); | ||
} | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
...ve/format/landsat8/GDALGeoTiffReader.java → ...pter/raster/plugin/GDALGeoTiffReader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...r/src/main/resources/META-INF/services/org.geotools.coverage.grid.io.GridFormatFactorySpi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
mil.nga.giat.geowave.adapter.raster.plugin.GeoWaveGTRasterFormatFactory | ||
mil.nga.giat.geowave.adapter.raster.plugin.GDALGeoTiffFormatFactory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters