[Geoserver-devel] [JIRA] (GEOS-7631) Coverage name ignored for new coverages

Christopher Dresel created an issue

GeoServer / BugGEOS-7631

Coverage name ignored for new coverages

Issue Type:

BugBug

Affects Versions:

2.9.0

Assignee:

Unassigned

Components:

REST

Created:

12/Jul/16 2:50 PM

Priority:

MediumMedium

Reporter:

Christopher Dresel

Original Estimate:

1 hour

Remaining Estimate:

1 hour

When CoverageStores are created by setting the file via xml, the creation of the Coverage ignores the given name and uses nativeCoverageName instead.

This is because the name is not set after building the coverage, see here.

Something like the following should be enough to avoid this bug:

  • Before buildCoverage save coverage.getName() to some variable e.g. coverageName
  • After buildCoverage call coverage.setName(coverageName)

Steps to reproduce:

Post rest/workspaces/

<workspace xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<name>TestWorkspace</name>
</workspace>}}

Post rest/workspaces/TestWorkspace/coveragestores

<coverageStore xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<__default>false</__default>
<enabled>true</enabled>
<name>TestCoverageStore</name>
<type>ArcGrid</type>
<url>file://C:\data_dir\coverages\arc_sample\precip30min.asc</url>
<workspace>
    <name>TestWorkspace</name>
</workspace>
</coverageStore>

Post rest/workspaces/TestWorkspace/coveragestores/TestCoverageStore/coverages

<coverage xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=“http://www.w3.org/2001/XMLSchema”>
<name>TestCoverage</name>
<nativeName>precip30min</nativeName>
</coverage>

GET rest/workspaces/TestWorkspace/coveragestores/TestCoverageStore/coverages/TestCoverage

=> Results in 404

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v1000.141.2#100004-sha1:e5e3d33)

Atlassian logo