[mapserver-users] wfs data conversion with ogr2ogr?

bartvde at osgis.nl bartvde at osgis.nl
Tue Dec 16 01:58:20 PST 2008


If you look at the XML schema, i.e.

http://geoportal.geodaten.sachsen-anhalt.de/geodatenportal/servlet/gtEntryPoint?&REQUEST=DescribeFeatureType&VERSION=1.0.0&SERVICE=WFS&TYPENAME=featureSet_704

the optional field VERWALTUNG should contain the geometry.

Apparently these are not filled in the dataset that the WFS uses.

So you are doing nothing wrong, and I think you should contact the
maintainer of the WFS to ask if VERWALTUNG is present in any feature or
that it is always non-existant.

Best regards,
Bart

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Frank Warmerdam schrieb:
>> Knut Behrends wrote:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> Hi all,
>>>
>>> I have received data from a WFS that was returned in this format:
>>> (Sample feature member)
>>>
>>>   <gml:featureMember>
>>>     <featureSet_704 fid="featureSet_704-feature_1732">
>>>       <gml:boundedBy>
>>>         <gml:Box>
>>>           <gml:coord>
>>>             <gml:X>4436682.0</gml:X>
>>>             <gml:Y>5783076.0</gml:Y>
>>>           </gml:coord>
>>>           <gml:coord>
>>>             <gml:X>4441086.0</gml:X>
>>>             <gml:Y>5786776.0</gml:Y>
>>>           </gml:coord>
>>>         </gml:Box>
>>>       </gml:boundedBy>
>>>       <GEOM_ID>1732</GEOM_ID>
>>>       <NAME>Marienborn</NAME>
>>>     </featureSet_704>
>>>   </gml:featureMember>
>> ...
>>
>>> After successful conversion, however, only the GEOM_ID and the NAME are
>>> exported. The spatial information is ignored lost during the
>>> conversion.
>>> Maybe it's in the wrong format, but it is obviously present  in the GML
>>> fragment above. What can I do to convert the spatial information that
>>> is
>>> contained in the <X> and <Y> elements?
>>
>> Knut,
>>
>> The above feature fragment from a WFS lacks a geometry properly.  The
>> boundedBy properly is normally ignored by OGR.  Following is a simple
>> example of a GML feature with a point geometry attribute.
>>
>>   <gml:featureMember>
>>     <airports fid="2">
>>       <NAME>Bowstring Municipal Airport</NAME>
>>       <LAT>     47.5583</LAT>
>>       <LON>    -93.8689</LON>
>>       <ELEVATION>   1372.0000</ELEVATION>
>>       <QUADNAME>Jessie Lake</QUADNAME>
>>
>> <ogr:geometryProperty><gml:Point><gml:coordinates>434634,5267578</gml:coordinates></gml:Point></ogr:geometryProperty>
>>
>>     </airports>
>>   </gml:featureMember>
>>
>> If you can influence your WFS, then producing something a bit like this
>> might be good.
>>
>
> The (non-UMN-mapserver based) WFS is public, and I am acting as a WFS
> client, merely retrieving data. Maybe it's just the HTTP GET request
> that was misspelled or incomplete.
> This was my request:
> http://geoportal.geodaten.sachsen-anhalt.de/geodatenportal/servlet/gtEntryPoint?&REQUEST=GetFeature&VERSION=1.0.0&SERVICE=WFS&TYPENAME=featureSet_704&BBOX=4400161.55779751,5779082.69612775,4502841.70515686,5881251.07072079&MAXFEATURES=100
>
> Are these the correct URL parameters?
>
> - --
> ____________________________________________________________________________
>
> Knut Behrends                         Phone: +49 (0) 331 288 1688
> Potsdam 14473                         KeyID: 0xF22CACEF (PGP Public Key)
> ____________________________________________________________________________
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAklHdWYACgkQcfWHNfIsrO80hgCdETv+sJBSTYcLYTj9t76UZwwe
> 1IEAoKAgXrz4RwwDrmsVA6aUPkSgot6L
> =RyzI
> -----END PGP SIGNATURE-----
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>





More information about the MapServer-users mailing list