| 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 |