[Gdal-dev] OGR GML output

Frank Warmerdam fwarmerdam at gmail.com
Wed Jan 26 23:43:53 EST 2005


On Wed, 26 Jan 2005 21:52:55 -0500, Kralidis,Tom [Burlington]
<Tom.Kralidis at ec.gc.ca> wrote:
> 
> Hi,
> 
> Using under GDAL 1.2.5, I converted a shapefile to a GML document, i.e.:
> 
> ogr2ogr -f GML out.gml hydroshedg.shp
> 
> ...and have some comments / suggestions w.r.t. the output GML:
> 
> .xsd file generated:
> 
> - http://schemas.cubewerx.com/schemas/gml/2.1.2/feature.xsd is used as
> the schemaLocation for the GML import.  Suggest changing to
> http://schemas.opengeospatial.net/gml/2.1.2/feature.xsd

Tom,

Updated the schemaLocation.
 
> - the ogr namespace in the .xsd and the .gml document differ.  Should be
> the same (suggest http://gdal.maptools.org/ogr/)

I have changed them both to be http://ogr.maptools.org/. 

> .gml file generated:
> 
> - the root element should add an attribute which points to the .xsd file
> generated (i.e. xsi:schemaLocation="http://gdal.maptools.org/ogr/
> ./out.xsd"

There is a line that reads:

     xsi:schemaLocation=". out.xsd"

I assume that is the correct way to refer to an out.xsd file in the
same directory as the file referencing it ... isn't it?  I can't very
well refer to http://gdal.maptools.org/ogr as being the location
since it will never be there, can I? 
 
> - suggest a default namespace in the root element (i.e.
> xmlns="http://gdal.maptools.org/ogr/"), thus negating the requirement to
> prefix elements with "ogr".

I have added this.  Is there any harm in including the "ogr" prefixes
on elements?  I think it makes things clearer. 
 
> I'd be willing to help out with this in terms of testing and XML /
> Schema design.

I have also committed the changes I made last week to bring the
OGR GML support into line with the 3L0 (GML 3 Level 0) profile
document with the exception that I still refer to the GML 2.1.2 
feature.xsd.  

If you get a chance to try what is in CVS now, I would appreciate
additional feedback.  I'm afraid XML (especially stuff related to 
XML Schema and namespaces) is not my forte so help is 
appreciated. 

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    | Geospatial Programmer for Rent



More information about the Gdal-dev mailing list