Opened 18 years ago

Last modified 18 years ago

#1207 closed defect (fixed)

ExportToGML doesn't include SRS

Reported by: schuyler@… Owned by: Mateusz Łoskot
Priority: high Milestone:
Component: OGR_SRS Version: unspecified
Severity: normal Keywords:
Cc: schuyler@…

Description

An OGR geometry that has an spatial reference assigned doesn't show projeciton
info in the GML output when ExportToGML is called on the geometry. FrankW has
suggested that it should be possible to search for a corresponding EPSG code and
add an srsName attribute to the GML geometry element if one exists.

Change History (1)

comment:1 by Mateusz Łoskot, 18 years ago

I've just committed this feature to the GDAL CVS.
Now, when exporting OGR geometry to GML and this geometry has assigned SRS, then
srsName attribute with value of EPSG code is added to GML geometry tags.
This behaviour follows GML 2.x specification.

I also added new test cases to gdalautotest to test this feature with various
geometries.

Sample ogr2ogr usage to produce GML output with srsName attribute:

ogr2ogr -t_srs "EPSG:4326" -f "GML" point.gml point.shp

Tests and comments are welcome
Note: See TracTickets for help on using tickets.