[Gdal-dev] GML writing issue

Bart van den Eijnden (OSGIS) bartvde at xs4all.nl
Fri May 19 03:51:20 EDT 2006


Hi list,

when trying to use a Mapserver 4.8.3 generated GML file in OGR, we are
running into a few issues. Mapserver uses ms as the namespace prefix in
the GML. OGR raises a few warnings, but if I look into the resulting GML
file all attribute information is lost in fact.

H:\appl\FWTools1.0.0a7\bin>ogr2ogr -f "GML" test.gml
D:\temp\gdelivery\mapserv.gml
Warning 1: Layer name 'ms:AAA132' adjusted to 'ms_AAA132' for XML validity.
Warning 1: Field name 'ms:TDN_CODE' adjusted to 'ms_TDN_CODE' to be a valid
XML element name.
Warning 1: Field name 'ms:OMSCHRIJVI' adjusted to 'ms_OMSCHRIJVI' to be a
valid
XML element name.
Warning 1: Field name 'ms:Area' adjusted to 'ms_Area' to be a valid
XML element name.
Warning 1: Field name 'ms:Perimeter' adjusted to 'ms_Perimeter' to be a valid
XML element name.

A second issue, the boundingbox is screwed up in the process. Mapserver
GML has:
      <gml:boundedBy>
      	<gml:Box srsName="EPSG:28992">
      		<gml:coordinates>192519.015625,320687.375000
194164.359375,322355.968750</gml:coordinates>
      	</gml:Box>
      </gml:boundedBy>

The output from OGR is:
  <gml:boundedBy>
    <gml:Box>
      <gml:coord><gml:X>0</gml:X><gml:Y>0</gml:Y></gml:coord>
      <gml:coord><gml:X>194164.359375</gml:X><gml:Y>322355.96875</gml:Y></gml:coord>
    </gml:Box>
  </gml:boundedBy>

which gives trouble viewing the GML in e.g. Gaia.

Another issue is when transforming Mapserver GML into an ESRI Shapefile.
The attributes in the dbf files are named ms:XXX. TatukGIS won't show any
attribute info, and OpenEV even crashes on this shapefile.

Best regards,
Bart




More information about the Gdal-dev mailing list