Rich, I was testing with the original geotiff
https://www.sendspace.com/file/zkde1q and i'm getting an exception in the index write
java.util.NoSuchElementException
at java.util.TreeMap.key(TreeMap.java:1221)
at java.util.TreeMap$NavigableSubMap.firstKey(TreeMap.java:1452)
at mil.nga.giat.geowave.adapter.raster.adapter.RasterDataAdapter.convertToIndex(RasterDataAdapter.java:474)
at mil.nga.giat.geowave.adapter.raster.adapter.RasterDataAdapter.convertToIndex(RasterDataAdapter.java:1)
at mil.nga.giat.geowave.core.store.IndependentAdapterIndexWriter.write(IndependentAdapterIndexWriter.java:57)
at mil.nga.giat.geowave.core.store.IndexCompositeWriter.write(IndexCompositeWriter.java:36)
This is the updated ingest code using the last geowave
Hints hints = new Hints();
hints.put(Hints.DEFAULT_COORDINATE_REFERENCE_SYSTEM, CRS.decode("EPSG:4326"));
GridCoverage2d coverage = new GeoTiffReader(new File("x.tiff"), hints).read(null);
geowaveDataStore = new AccumuloDataStore(new AccumuloIndexStore(instance),
new AccumuloAdapterStore(instance),
new AccumuloDataStatisticsStore(instance),
new AccumuloSecondaryIndexDataStore(instance),
new AccumuloAdapterIndexMappingStore(instance),
instance);
PrimaryIndex index = new SpatialIndexBuilder().setAllTiers(true).createIndex();
final Map<String, String> metadata = new HashMap<String, String>();
RasterDataAdapter adapter = new RasterDataAdapter(coverageName, metadata, coverage, 256, true, new NoDataMergeStrategy());
try (IndexWriter indexWriter = geowaveDataStore.createWriter(adapter, index)) {
indexWriter.write(coverage);
} catch (IOException e) {}
I'm forcing the CRS as the geotiff shows an unknown one (imported from grib), but was told it was in fact EPSG:4326.
Maybe is this some kind of bug or my ingest code is missing something?
Thanks,
De: geowave-dev-bounces@xxxxxxxxxxxxxxxx <geowave-dev-bounces@xxxxxxxxxxxxxxxx> en nombre de Jose M <soloninguno@xxxxxxxxxxx>
Enviado: martes, 10 de mayo de 2016 05:04 p.m.
Para: geowave-dev@xxxxxxxxxxxxxxxx
Asunto: Re: [geowave-dev] Multiband geotiff problem
Rich,
After starting from scratch again i got the same issue. But by some kind of accident i think i discover the problem here.
When I update the geowave code to the latest, I saw there were some changes in the way to ingest the code and how to create the accumulo data store. And I also saw some issues with my project dependencies as it seems the geotiff reader from
geotools wasn't included anymore (i suppose i had it auto included with some old geowave dependency). So I start to look more in depth in my dependencies and found out that I had the gt-epsg-hsql database included because of the imageio ext dependency. Although
it was the only epsg database i had in the classpath, it wasn't the same database that geowave has as dependency, so I decided to switch it, excluding gt-epsg-hsql and adding gt-epsg-wtk as a standalone dependency. After doing that and ingesting again in
geowave, i got the entire geotiff rendering ok in geoserver!
I'm not trully sure why it fails before because i didn't have both wtk and hsql databases at the same time. But at least i have now the simple case working with the usgs sample,
and I can start trying with the my real geotiffs (like the one I post in my first message).
Thanks and hope you don't lost much time looking at this.
De: geowave-dev-bounces@xxxxxxxxxxxxxxxx <geowave-dev-bounces@xxxxxxxxxxxxxxxx> en nombre de Rich Fecher <rfecher@xxxxxxxxx>
Enviado: lunes, 09 de mayo de 2016 03:46 p.m.
Para: geowave-dev@xxxxxxxxxxxxxxxx
Asunto: Re: [geowave-dev] Multiband geotiff problem
Jose,
I downloaded geoserver 2.8.2 without any special extensions, built the latest version of geowave for geoserver by enabling building the shaded jar from the geowave-deploy module `cd deploy; mvn package -P geotools-container-singlejar` Then I copied the shaded
jar from the target directory to geoserver's WEB-INF/lib. I can't imagine I did much differently, and for ingest I simply ran you code snippet on the same geotiff (
o41078a5.tif).
As mentioned, I was hoping to recreate the problem, but geoserver's openlayers preview of that image worked well unless I zoomed to a scale that wasn't within the image pyramid (in which case it just wouldn't update tiles). Using GeoServer 2.7.x worked with
zooming in and out, but the fix in the PR linked below will deprecate support of GeoServer 2.7.x for future releases of GeoWave in favor of supporting GeoServer 2.8.x and future releases. I am very interested in trying to understand what is happening in your
situation and helping as best I can. I haven't seen an image broken in pieces as you experienced, but would like to get to the bottom of it if there is an underlying issue.
Thanks!
Rich