common srs output multiple times in wms getCapabilities - patch included here
-----------------------------------------------------------------------------
Key: GEOS-388
URL: http://jira.codehaus.org/browse/GEOS-388
Project: GeoServer
Type: Bug
Versions: 1.3-rc2
Environment: all
Reporter: James Eitelberg
Assigned to: dblasby
Fix For: 1.3-rc3
Geoserver 1.3.0-rc2 outputs the common SRS multiple times in the getCapabilities request. It is output once in the output for common srs and again in the full list for supported SRSs.
Tools such as Carbon Project's Gaia WMS browser choke on the getCapabilities since the SRS is used as a key to a hash table for supported projections. This started when reprojection support was added, but I am just getting around to submitting a bug report (and fix :))
Since I can see no need for the SRS to be listed twice, would you accept the following patch to WMSCapsTransformer.java?
I need this patch asap, and was hoping it would make it into the next release candidate. (rc3)
Patch starts around line 474 as shown below
if (!(commonSRS.equals("")))
{
comment("common SRS:");
element("SRS", commonSRS);
}
//okay - we've sent out the commonSRS, if it exists.
comment("All supported EPSG projections:");
try {
Set s = CRS.getSupportedCodes("EPSG");
Iterator it = s.iterator();
while (it.hasNext())
{
// patch starts here
// do not output srs if it was output as common srs
// note, if commonSRS is "", this will not match
String currentSRS = it.next().toString();
if (!currentSRS.equals(commonSRS))
{
element("SRS", currentSRS );
}
}
.....geoserver-devel
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira