Ticket #2762 (new bug)

Opened 3 years ago

OpenLayers.Format.GML doesn't understand the srsDimension attribute on a gml:posList element

Reported by: msharman Owned by: tschaub
Priority: major Milestone: 2.13 Release
Component: Format.GML Version: 2.9
Keywords: Cc:
State:

Description

I've been experiencing a problem loading a GML polygon into a layer.

After tracing through the code I believe that the OpenLayers.Format.GML.js is looking for the wrong attribute when passed a gml:posList element.

The relevant GML 3.1.1 code like: <gml:posList srsDimension=”2”> ... </gml:posList>

But the function linestring seems to be expecting something like: <gml:posList dimension=”2” ... </gml:posList>

I made a small change to make this “srsDimension” instead of “dimension” and the polygon is now displayed correctly.

Now I’m a new to GML but according to  http://schemas.opengis.net/gml/3.1.1/base/geometryBasic0d1d.xsd: The element “gml:posList” uses the type “gml:DirectPositionListType” that is based on “gml:doubleList” and uses the attribute group “gml:SRSReferenceGroup” which is defined to have the “srsDimension” attribute.

So it looks like the comment is incorrect in OpenLayers/Format/GML.js and the correct attribute is “srsDimension”.

I've attached the complete example GML.

Attachments

exampleGML311.txt Download (4.6 KB) - added by msharman 3 years ago.
An example of the GML that doesn't load
gmlPatch.diff Download (0.7 KB) - added by msharman 3 years ago.
This simple change fixes the problem for me (GML 3.1.1) not sure if this is compatible with other GML versions ??

Change History

Changed 3 years ago by msharman

An example of the GML that doesn't load

Changed 3 years ago by msharman

This simple change fixes the problem for me (GML 3.1.1) not sure if this is compatible with other GML versions ??

Note: See TracTickets for help on using tickets.