[Gdal-dev] GML writing issue

Bart van den Eijnden (OSGIS) bartvde at xs4all.nl
Fri May 19 12:15:50 EDT 2006


Hi Frank, Mateusz,

I am not saying it is invalid GML, I am saying the values are wrong.

XMIN and YMIN in the Mapserver GML are:

192519.015625
320687.375000

But in OGR's output they are both 0.

I will file some bugs on Monday.

Best regards,
Bart

Mateusz Loskot wrote:

>Frank Warmerdam wrote:
>  
>
>>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?
>>    
>>
>
>IMO this output if valid GML 2.
>According to schema in geometry.xsdv2.06 gmlBox can correctly encode
>coordinates in one of following
>style: gml:coord or gml:coordinates what <choice> XSD selector suggests:
>
><sequence>
><choice>
><element ref="gml:coord" minOccurs="2" maxOccurs="2"/>
><element ref="gml:coordinates"/>
></choice>
></sequence>
>
>  
>
>>Some of these things have changed a bit between GML 2 and
>>GML 3.  Perhaps I'm outputing GML 3 boxes?
>>    
>>
>
>No, I don't think this output is GML 3.
>AFIK, in GML 3, gml:Box has been replaced with gml:boundingBox.
>gml:boundingBox is of type of Envelope which also allows to use
>gml:coord or gml:coordinates as subelements.
>
>gml:Box is deprecated and used only for backward compatibility and as
>such, it's defined as gml:Envelope type:
>
>"NOTE To provide backward compatibility with GML version 2, an
>additional element gml:Box is provided, with an identical content model
>and substitutable for gml:Envelope. This component is deprecated and
>should not be used in new applications."
>
>Cheers
>  
>


-- 
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl




More information about the Gdal-dev mailing list