[OpenLayers-Dev] GML 3.2.1, <Ring> and <LineStringSegment>

Bart van den Eijnden (OSGIS) bartvde at osgis.nl
Fri Sep 24 07:44:49 EDT 2010


Hi Steven,

how about getVertices?

Best regards,
Bart

> Hi all,
>
> I've got a GML 3.2.1 response which uses:
> <MultiSurface><surfaceMember><Surface><patches><PolygonPatch><exterior>
> <Ring><curveMember><Curve><segments><LineStringSegment><posList>
>
> Which unfortunately is a valid in an insane GML kind of way.  The trouble
> I have is that OpenLayers parses the posList as a
> OpenLayers.Geometry.LineString, since it is a LineStringSegment. However
> the Polygon geometry expects a OpenLayers.Geometry.LinearRing.
> I've added a "Ring" reader to Format.GML.v3:
> "Ring": function(node, obj) {
>                 var container = {};
>                 this.readChildNodes(node, container);
>                 obj.components = [new OpenLayers.Geometry.LinearRing(
>                     container.points
>                 )];
>             },
>
> But the container which is passed on from the LineStringSegment reader
> does not contain points anymore, but a LineString component.
>
> Is there a way to get the points out of this LineString component? Or does
> anyone have an alternative approach?
>
> regards,
> Steven
> _______________________________________________
> Dev mailing list
> Dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev
>




More information about the Dev mailing list