Hi,
I am attempting to use the GeoServer REST endpoints to create a layer using
the Image Mosaic plugin by performing a "PUT" with a zip file containing a
png image, an indexer.xml, and a datastore.properties file. When I PUT this
zip to Geoserver, a store is created along with the corresponding
<layername>.xml, but no layer is created and no <layername>.properties file
is generated.
I am receiving the following exception in the GeoServer log:
2014-10-20 12:04:39,946 ERROR [geoserver.rest] - Error auto-configuring
coverage:0
2014-10-20 12:04:39,946 ERROR [geoserver.rest] -
org.geoserver.rest.RestletException:
java.lang.ArrayIndexOutOfBoundsException: 0
at
org.geoserver.catalog.rest.CoverageStoreFileResource.handlePut(CoverageStoreFileResource.java:225)
at org.restlet.Finder.handle(Finder.java:298)
at
org.geoserver.rest.BeanDelegatingRestlet.handle(BeanDelegatingRestlet.java:37)
at org.restlet.Filter.doHandle(Filter.java:105)
.
.
.
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at
org.geoserver.catalog.rest.CoverageStoreFileResource.handlePut(CoverageStoreFileResource.java:211)
I have a working implementation where I am using a netcdf file along with an
indexer.xml, datastore.properties, and auxiliary.xml to create a layer using
the REST endpoints. I believe the netcdf files have metadata used by the
netcdf plugin to assist in creating the layer, whereas my png's do not
include metadata.
The tutorial at
http://docs.geoserver.org/latest/en/user/tutorials/imagemosaic_timeseries/imagemosaic_timeseries.html
is very similar to what I am trying to do, except it is using .tif's instead
of .png's. I have followed this tutorial successfully using the given .tifs
but have not been able to use pngs, probably because they do not have the
metadata included in the .tifs.
The Image Mosaic plugin documentation page at
http://docs.geoserver.org/latest/en/user/tutorials/image_mosaic_plugin/imagemosaic.html#introduction
suggests that a worldfile (.pgw) can be used with .pngs.
Is a worldfile what I am missing here? What are the differences between
creating a layer from a netcdf file and a set of png files? Does anyone have
an idea about what might cause the exception given above?
Thank you for any help you may be able to provide.
I am using GeoServer version 2.5.1
-Paul
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Using-the-Image-Mosiac-plugin-and-GeoServer-REST-API-to-create-a-layer-tp5168488.html
Sent from the GeoServer - User mailing list archive at Nabble.com.