[Geoserver-devel] [JIRA] (GEOS-7717) Malformed WMS GetFeatureInfo XML response if raster sample dimension description not valid NCName

Ben Caradoc-Davies [Administrator] created an issue

GeoServer / BugGEOS-7717

Malformed WMS GetFeatureInfo XML response if raster sample dimension description not valid NCName

Issue Type:

BugBug

Affects Versions:

2.9.1, 2.10-M0

Assignee:

Ben Caradoc-Davies [Administrator]

Components:

NetCDF, WMS

Created:

05/Sep/16 5:02 AM

Priority:

MediumMedium

Reporter:

Ben Caradoc-Davies [Administrator]

RasterLayerIdentifier builds a SimpleFeatureType to service WMS GetFeatureInfo requests by using the sample dimension descriptions as the local names of the properties. For NetCDF, these are the long_name of the source variable, but this attribute can contain any text, including spaces. Because the local name of any XML element must be an xs:NCName, a property name built from a long_name that contains spaces causes a GetFeatureInfo XML response to be malformed.

For example, a coverage from a NetCDF file with:

analyzed_sst:long_name = "Analyzed Sea Surface Temperature"

will result in malformed GetFeatureInfo XML responses like this snippet:

<sf:Analyzed Sea Surface Temperature>23.0</sf:Analyzed Sea Surface Temperature>

The proposed solution is to convert sample dimension descriptions to valid NCNames by replacing invalid characters with underscore ("_") and null or empty descriptions with Unknown".

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v1000.305.0#100011-sha1:1dc2d9a)

Atlassian logo