GML parser.
This adds a parser (read/write) for GML v2 and v3. GML v3 is limited to the simple features profile of GML 3.1.1, just like OpenLayers 2 was. This will be the basis for the WFS parser, but it only makes sense to continue this work once feature modification (insert, update, delete) is in place in ol3. So the WFS parser will be another pull request.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
<gml:Curve xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:segments>
|
||||
<gml:LineStringSegment>
|
||||
<gml:posList>1 2 3 4</gml:posList>
|
||||
</gml:LineStringSegment>
|
||||
</gml:segments>
|
||||
</gml:Curve>
|
||||
@@ -0,0 +1,15 @@
|
||||
<gml:featureMembers xmlns:gml="http://www.opengis.net/gml">
|
||||
<topp:gnis_pop gml:id="gnis_pop.148604" xmlns:topp="http://www.openplans.org/topp">
|
||||
<gml:name>Aflu</gml:name>
|
||||
<topp:the_geom>
|
||||
<gml:Point srsName="urn:x-ogc:def:crs:EPSG:4326">
|
||||
<gml:pos>34.12 2.09</gml:pos>
|
||||
</gml:Point>
|
||||
</topp:the_geom>
|
||||
<topp:population>84683</topp:population>
|
||||
<topp:country>Algeria</topp:country>
|
||||
<topp:type>place</topp:type>
|
||||
<topp:name>Aflu</topp:name>
|
||||
<topp:empty></topp:empty>
|
||||
</topp:gnis_pop>
|
||||
</gml:featureMembers>
|
||||
@@ -0,0 +1,4 @@
|
||||
<gml:Envelope xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:lowerCorner>1 2</gml:lowerCorner>
|
||||
<gml:upperCorner>3 4</gml:upperCorner>
|
||||
</gml:Envelope>
|
||||
@@ -0,0 +1,3 @@
|
||||
<gml:LinearRing xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
@@ -0,0 +1,3 @@
|
||||
<gml:LineString xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:posList>1 2 3 4</gml:posList>
|
||||
</gml:LineString>
|
||||
@@ -0,0 +1,3 @@
|
||||
<gml:LineString xmlns:gml="http://www.opengis.net/gml" srsName="foo" srsDimension="3">
|
||||
<gml:posList>1 2 3 4 5 6</gml:posList>
|
||||
</gml:LineString>
|
||||
@@ -0,0 +1,20 @@
|
||||
<gml:MultiCurve xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:curveMember>
|
||||
<gml:Curve>
|
||||
<gml:segments>
|
||||
<gml:LineStringSegment>
|
||||
<gml:posList>1 2 2 3</gml:posList>
|
||||
</gml:LineStringSegment>
|
||||
</gml:segments>
|
||||
</gml:Curve>
|
||||
</gml:curveMember>
|
||||
<gml:curveMember>
|
||||
<gml:Curve>
|
||||
<gml:segments>
|
||||
<gml:LineStringSegment>
|
||||
<gml:posList>3 4 4 5</gml:posList>
|
||||
</gml:LineStringSegment>
|
||||
</gml:segments>
|
||||
</gml:Curve>
|
||||
</gml:curveMember>
|
||||
</gml:MultiCurve>
|
||||
@@ -0,0 +1,12 @@
|
||||
<gml:MultiCurve xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:curveMember>
|
||||
<gml:LineString>
|
||||
<gml:posList>1 2 2 3</gml:posList>
|
||||
</gml:LineString>
|
||||
</gml:curveMember>
|
||||
<gml:curveMember>
|
||||
<gml:LineString>
|
||||
<gml:posList>3 4 4 5</gml:posList>
|
||||
</gml:LineString>
|
||||
</gml:curveMember>
|
||||
</gml:MultiCurve>
|
||||
@@ -0,0 +1,10 @@
|
||||
<gml:MultiLineString xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:lineStringMembers>
|
||||
<gml:LineString>
|
||||
<gml:posList>1 2 2 3</gml:posList>
|
||||
</gml:LineString>
|
||||
<gml:LineString>
|
||||
<gml:posList>3 4 4 5</gml:posList>
|
||||
</gml:LineString>
|
||||
</gml:lineStringMembers>
|
||||
</gml:MultiLineString>
|
||||
@@ -0,0 +1,12 @@
|
||||
<gml:MultiLineString xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:lineStringMember>
|
||||
<gml:LineString>
|
||||
<gml:posList>1 2 2 3</gml:posList>
|
||||
</gml:LineString>
|
||||
</gml:lineStringMember>
|
||||
<gml:lineStringMember>
|
||||
<gml:LineString>
|
||||
<gml:posList>3 4 4 5</gml:posList>
|
||||
</gml:LineString>
|
||||
</gml:lineStringMember>
|
||||
</gml:MultiLineString>
|
||||
@@ -0,0 +1,13 @@
|
||||
<gml:MultiPoint xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:pointMembers>
|
||||
<gml:Point>
|
||||
<gml:pos>1 2</gml:pos>
|
||||
</gml:Point>
|
||||
<gml:Point>
|
||||
<gml:pos>2 3</gml:pos>
|
||||
</gml:Point>
|
||||
<gml:Point>
|
||||
<gml:pos>3 4</gml:pos>
|
||||
</gml:Point>
|
||||
</gml:pointMembers>
|
||||
</gml:MultiPoint>
|
||||
@@ -0,0 +1,17 @@
|
||||
<gml:MultiPoint xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:pointMember>
|
||||
<gml:Point>
|
||||
<gml:pos>1 2</gml:pos>
|
||||
</gml:Point>
|
||||
</gml:pointMember>
|
||||
<gml:pointMember>
|
||||
<gml:Point>
|
||||
<gml:pos>2 3</gml:pos>
|
||||
</gml:Point>
|
||||
</gml:pointMember>
|
||||
<gml:pointMember>
|
||||
<gml:Point>
|
||||
<gml:pos>3 4</gml:pos>
|
||||
</gml:Point>
|
||||
</gml:pointMember>
|
||||
</gml:MultiPoint>
|
||||
@@ -0,0 +1,28 @@
|
||||
<gml:MultiPolygon xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:polygonMembers>
|
||||
<gml:Polygon>
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>2 3 4 5 6 7 2 3</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>3 4 5 6 7 8 3 4</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
</gml:Polygon>
|
||||
<gml:Polygon>
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
</gml:Polygon>
|
||||
</gml:polygonMembers>
|
||||
</gml:MultiPolygon>
|
||||
@@ -0,0 +1,30 @@
|
||||
<gml:MultiPolygon xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:polygonMember>
|
||||
<gml:Polygon>
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>2 3 4 5 6 7 2 3</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>3 4 5 6 7 8 3 4</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
</gml:Polygon>
|
||||
</gml:polygonMember>
|
||||
<gml:polygonMember>
|
||||
<gml:Polygon>
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
</gml:Polygon>
|
||||
</gml:polygonMember>
|
||||
</gml:MultiPolygon>
|
||||
@@ -0,0 +1,28 @@
|
||||
<gml:MultiSurface xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:surfaceMembers>
|
||||
<gml:Polygon>
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>2 3 4 5 6 7 2 3</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>3 4 5 6 7 8 3 4</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
</gml:Polygon>
|
||||
<gml:Polygon>
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
</gml:Polygon>
|
||||
</gml:surfaceMembers>
|
||||
</gml:MultiSurface>
|
||||
@@ -0,0 +1,30 @@
|
||||
<gml:MultiSurface xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:surfaceMember>
|
||||
<gml:Polygon>
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>2 3 4 5 6 7 2 3</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>3 4 5 6 7 8 3 4</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
</gml:Polygon>
|
||||
</gml:surfaceMember>
|
||||
<gml:surfaceMember>
|
||||
<gml:Polygon>
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
</gml:Polygon>
|
||||
</gml:surfaceMember>
|
||||
</gml:MultiSurface>
|
||||
@@ -0,0 +1,38 @@
|
||||
<gml:MultiSurface xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:surfaceMember>
|
||||
<gml:Surface>
|
||||
<gml:patches>
|
||||
<gml:PolygonPatch interpolation="planar">
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>2 3 4 5 6 7 2 3</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>3 4 5 6 7 8 3 4</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
</gml:PolygonPatch>
|
||||
</gml:patches>
|
||||
</gml:Surface>
|
||||
</gml:surfaceMember>
|
||||
<gml:surfaceMember>
|
||||
<gml:Surface>
|
||||
<gml:patches>
|
||||
<gml:PolygonPatch interpolation="planar">
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
</gml:PolygonPatch>
|
||||
</gml:patches>
|
||||
</gml:Surface>
|
||||
</gml:surfaceMember>
|
||||
</gml:MultiSurface>
|
||||
@@ -0,0 +1,3 @@
|
||||
<gml:Point xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:pos>1 2</gml:pos>
|
||||
</gml:Point>
|
||||
@@ -0,0 +1,17 @@
|
||||
<gml:Polygon xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>2 3 4 5 6 7 2 3</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>3 4 5 6 7 8 3 4</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
</gml:Polygon>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<wfs:FeatureCollection numberOfFeatures="1" timeStamp="2010-01-29T15:10:38.921-07:00"
|
||||
xsi:schemaLocation="http://medford.opengeo.org http://localhost:8080/geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=medford%3Azoning http://www.opengis.net/wfs http://localhost:8080/geoserver/schemas/wfs/1.1.0/wfs.xsd"
|
||||
xmlns:ogc="http://www.opengis.net/ogc"
|
||||
xmlns:wfs="http://www.opengis.net/wfs"
|
||||
xmlns:medford="http://opengeo.org/#medford"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:ows="http://www.opengis.net/ows"
|
||||
xmlns:gml="http://www.opengis.net/gml"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<gml:featureMembers>
|
||||
<medford:zoning gml:id="zoning.1">
|
||||
<medford:the_geom>
|
||||
<gml:MultiSurface srsName="urn:x-ogc:def:crs:EPSG:4326">
|
||||
<gml:surfaceMember>
|
||||
<gml:Polygon>
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>42.397027571297585 -122.88465674265922 42.39702893980587 -122.88509730796012 42.397029086785146 -122.88511582432085 42.39702379767053 -122.88528111596624 42.39748517484964 -122.88529300380065 42.39748473847452 -122.88509914138723 42.39748482219041 -122.8849959517568 42.397485082635576 -122.8846741899541 42.3974853307826 -122.88436529392652 42.39702663751206 -122.88435664014142 42.397027571297585 -122.88465674265922</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
</gml:Polygon>
|
||||
</gml:surfaceMember>
|
||||
</gml:MultiSurface>
|
||||
</medford:the_geom>
|
||||
<medford:objectid>1</medford:objectid>
|
||||
<medford:cityzone>YES</medford:cityzone>
|
||||
<medford:zoning>I-L</medford:zoning>
|
||||
<medford:revdate>2004-04-12T00:00:00-06:00</medford:revdate>
|
||||
<medford:finord></medford:finord>
|
||||
<medford:filenum></medford:filenum>
|
||||
<medford:acres>0.95741118624</medford:acres>
|
||||
<medford:misc></medford:misc>
|
||||
<medford:shape_leng>835.705330224</medford:shape_leng>
|
||||
<medford:perimeter>835.705330224</medford:perimeter>
|
||||
<medford:area>41704.8312728</medford:area>
|
||||
<medford:shape_le_1>835.705330224</medford:shape_le_1>
|
||||
<medford:shape_area>41704.8312728</medford:shape_area>
|
||||
<medford:hectares>0.38745056079</medford:hectares>
|
||||
</medford:zoning>
|
||||
</gml:featureMembers>
|
||||
</wfs:FeatureCollection>
|
||||
@@ -0,0 +1,21 @@
|
||||
<gml:Surface xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:patches>
|
||||
<gml:PolygonPatch interpolation="planar">
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>2 3 4 5 6 7 2 3</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>3 4 5 6 7 8 3 4</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
</gml:PolygonPatch>
|
||||
</gml:patches>
|
||||
</gml:Surface>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user