[Gdal-dev] GML writing issue

Frank Warmerdam warmerdam at pobox.com
Fri May 19 10:58:33 EDT 2006


Bart van den Eijnden (OSGIS) wrote:
> 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.

Bart,

Could you file a bug on this issue providing a sample input file that
demonstrates the problem?

> 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.

Are you suggesting that the OGR GML box output is actually invalid
GML?  Any particular reason you think that, other than some apps not
reading it?  Some of these things have changed a bit between GML 2 and
GML 3.  Perhaps I'm outputing GML 3 boxes?

> 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.

Please file a bug with the details to reproduce this, and a shapefile that
will crash OpenEV.  As Mateusz says, a colon in a field name may be
bad karma for shapefiles, but I'm hesitant to doctor the shapefile field
names too much without really knowing which characters are safe and which
are not.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org




More information about the Gdal-dev mailing list