[Geoserver-devel] [jira] (GEOS-6472) Name conflicts when creating ImagePyramid Coverage via REST

Robert Coup created an issue

GeoServer / BugGEOS-6472

Name conflicts when creating ImagePyramid Coverage via REST

Issue Type:

BugBug

Affects Versions:

2.5

Assignee:

Andrea Aime

Components:

Image Pyramid, REST

Created:

04/May/14 4:59 PM

Labels:

coverage coveragestores rest imagepyramid

Priority:

MajorMajor

Reporter:

Robert Coup

Steps:

  1. Create a pyramid in /path/to/mycs via gdal_retile

  2. Create a coverageStore via REST (eg. “mycs”) via: POST /geoserver/rest/workspaces/myws/coveragestores/mycs/external.imagepyramid?configure=none with data: file=/path/to/mycs

  3. Create a coverage via REST (eg. “mycoverage”) via: POST /geoserver/rest/workspaces/myws/coveragestores/mycs/coverages.json with data:

    {name: "mycoverage", nativeName: "mycs", ...}
    
  4. Get a 500 error:

    Caused by: java.lang.IllegalArgumentException: The specified coverageName mycoverageis not supported
            at org.geotools.coverage.grid.io.AbstractGridCoverage2DReader.getCoordinateReferenceSystem(AbstractGridCoverage2DReader.java:820)
            at org.geoserver.catalog.SingleGridCoverage2DReader.getCoordinateReferenceSystem(SingleGridCoverage2DReader.java:150)
            at org.geoserver.catalog.CatalogBuilder.initCoverage(CatalogBuilder.java:789)
            at org.geoserver.catalog.rest.CoverageResource.handleObjectPost(CoverageResource.java:86)
            at org.geoserver.rest.ReflectiveResource.handlePost(ReflectiveResource.java:120)
            ... 88 more
    
    

It does work if you pass every single property of the coverage in ? grid ranges, nativeCRS, extents, etc ? everything CatalogBuilder.initCoverage() tries to populate if it’s not provided. It works if you use ?configure=all, and it works through the GUI. My problem is that ?configure=all is very very slow for large pyramids, so we’re trying to skip that work and do it ahead of time via some scripts (creating the tile indexes and properties files).

The error occurs because the reader name (“Name=mycs” from “/path/to/mycs/mycs.properties”) is being checked against the coverage name (“mycoverage”) when configuring the new coverage via AbstractGridCoverage2DReader.checkName().

Creating the coveragestore as “mycoverage” via REST with “file:///path/to/mycs” with an existing mycs.properties/etc file existing, then the reader still has the “mycs” name so configuring the coverage fails in the same way.

It seems to work better if you (a) change the /path/to/mycs/mycs.properties file to have “Name=mycoverage”, (b) create the coveragestore as “mycoverage”, and (c) create the coverage as “mycoverage”. Though I’m still testing that approach.

This approach (having the coverage name differ from the coveragestore/reader name) worked okay under v2.1 and (iirc) v2.4.

Seems like the reader name, coverage store name, and coverage name should all be able to be independent?

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)

Atlassian logo