[OpenLayers-Dev] ESRI // WCS DescribeCoverage 1.1.0

Christopher Eykamp christopher.eykamp at tudor.lu
Mon May 26 09:16:46 PDT 2014


Hi Bart,

Not lame at all; these servers are out there, and it's (much) better to 
handle them than not to.

I think the proposed code is a good to handle the situation, and it 
seems to work.  I'll finish building out a set of tests, then submit a 
pull request.

Thanks much for your help!

Chris


On 05/26/2014 08:54 AM, Bart van den Eijnden wrote:
> I know this is lame as a workaround, but you could define another 
> namespace with a different key and then just copy its readers. 
> Untested patch:
>
> *index 743ed82..b1f1e60 100644*
> *--- a/lib/OpenLayers/Format/WCSDescribeCoverage/v1_1_0.js*
> *+++ b/lib/OpenLayers/Format/WCSDescribeCoverage/v1_1_0.js*
> @@ -27,7 +27,8 @@ OpenLayers.Format.WCSDescribeCoverage.v1_1_0 = 
> OpenLayers.Class(
>       wcs: "http://www.opengis.net/wcs/1.1",
>       xlink: "http://www.w3.org/1999/xlink",
>       xsi: "http://www.w3.org/2001/XMLSchema-instance",
> -        ows: "http://www.opengis.net/ows/1.1"
> +        ows: "http://www.opengis.net/ows/1.1",
> +        owsesri: "http://www.opengis.net/ows"
>   },
>
>
>   /**
> @@ -147,7 +148,8 @@ OpenLayers.Format.WCSDescribeCoverage.v1_1_0 = 
> OpenLayers.Class(
>               description.supportedFormats.push(format);
>           }
>       },
> -        "ows": 
> OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers["ows"]
> +        "ows": 
> OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers["ows"],
> +        "owsesri": 
> OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers["ows"]
>   },
>
>
>   CLASS_NAME: "OpenLayers.Format.WCSDescribeCoverage.v1_1_0"
>
> Best regards,
> Bart
>
> --
> Bart van den Eijnden
> Front-end Developer | Boundless
> @boundlessgeo
>
> On 23 May 2014, at 17:19, Christopher Eykamp 
> <christopher.eykamp at tudor.lu <mailto:christopher.eykamp at tudor.lu>> wrote:
>
>> Hello,
>>
>> I am getting the attached response from an ArcGIS WCS server, with 
>> request DescribeCoverage and protocol version 1.1.0.  OpenLayers 
>> (latest 1.x from GitHub) cannot retrieve the Title or Abstract 
>> attributes because the namespaces referenced in the 
>> OpenLayers.Format.WCSDescribeCoverage.v1_1_0 object conflict with 
>> what is referenced in the document.
>>
>> Specifically, the OpenLayers namespaces object includes this line:
>>
>>    ows: "http://www.opengis.net/ows/1.1"
>>
>> This in turn is used to generate a namespaceAlias lookup, which will 
>> return "ows" when looking up "http://www.opengis.net/ows/1.1". 
>> However, in this case, I need "ows" to be mapped to 
>> "http://www.opengis.net/ows".  If I make that change in the 
>> namespaces definition, tests break.  Unfortunately, given the way the 
>> aliases are defined, I cannot add a second namespace that maps to 
>> "ows", which might fix my problem.
>>
>> I am unsure how to proceed.  I can't tell if I am encountering a 
>> misbehaving server, or if this is just a limitation of the way 
>> OpenLayers is architected (hard-coded namespaces that can only have 
>> one namespace map to a given alias).  Or have I misunderstood 
>> something at a more fundamental level?
>>
>> Thanks for your advice!
>>
>> Chris
>>
>>
>>
>> <CoverageDescriptions xmlns="http://www.opengis.net/wcs/1.1" 
>> xmlns:ows="http://www.opengis.net/ows" 
>> xmlns:owcs="http://www.opengis.net/wcs/1.1/ows" 
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>> xmlns:gml="http://www.opengis.net/gml" 
>> xsi:schemaLocation="http://www.opengis.net/wcs/1.1 
>> ../wcsDescribeCoverage.xsd http://www.opengis.net/wcs/1.1/ows 
>> ../owsDataIdentification.xsd"><CoverageDescription><ows:Title>OSDATA.OS_25K_RASTER_1</ows:Title><ows:Abstract/><Identifier>1</Identifier><Domain><SpatialDomain><ows:BoundingBox 
>> crs="urn:ogc:def:crs:OGC::imageCRS" dimension="2"><ows:LowerCorner>0 
>> 0</ows:LowerCorner><ows:UpperCorner>16273 
>> 8848</ows:UpperCorner></ows:BoundingBox><ows:BoundingBox 
>> crs="urn:ogc:def:crs:EPSG::4326"><ows:LowerCorner>-2.4975225300277217 
>> 57.00034657412791</ows:LowerCorner><ows:UpperCorner>-2.0000237693585987 
>> 57.270861907368726</ows:UpperCorner></ows:BoundingBox><GridCRS><GridBaseCRS>urn:ogc:def:crs:EPSG::4326</GridBaseCRS><GridOrigin>-2.4975072449484337 
>> 57.27084662228944</GridOrigin><GridOffsets>3.057015857620272e-005 
>> -3.0570158576202496e-005</GridOffsets></GridCRS></SpatialDomain></Domain><Range><Field><Title>Field_1</Title><Abstract>Field_1</Abstract><Identifier>Field_1</Identifier><Definition><owcs:AnyValue/></Definition><NullValue>256</NullValue><NullValue>256</NullValue><NullValue>256</NullValue><owcs:InterpolationMethods><owcs:DefaultMethod>nearest</owcs:DefaultMethod><owcs:OtherMethod>bilinear</owcs:OtherMethod><owcs:OtherMethod>bicubic</owcs:OtherMethod></owcs:InterpolationMethods><Axis 
>> identifier="BAND"><AvailableKeys><Key>1</Key><Key>2</Key><Key>3</Key></AvailableKeys><owcs:DataType>Byte</owcs:DataType></Axis></Field></Range><SupportedCRS>urn:ogc:def:crs:EPSG::4326</SupportedCRS><SupportedCRS>urn:ogc:def:crs:EPSG::4326</SupportedCRS><SupportedFormat>image/GeoTIFF</SupportedFormat><SupportedFormat>image/NITF</SupportedFormat><SupportedFormat>image/HDF</SupportedFormat><SupportedFormat>image/PNG</SupportedFormat></CoverageDescription></CoverageDescriptions> 
>>
>> _______________________________________________
>> Dev mailing list
>> Dev at lists.osgeo.org <mailto:Dev at lists.osgeo.org>
>> http://lists.osgeo.org/mailman/listinfo/openlayers-dev
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20140526/6ae22c0f/attachment.html>


More information about the Dev mailing list