[gdal-dev] Conversion of MapInfo to GML using ogr2ogr - lat/long
format issue
Even Rouault
even.rouault at mines-paris.org
Thu Dec 22 04:09:11 EST 2011
Hi,
> I am getting the results in long/lat format but I need them in lat/long
> format.
>
> Reading through some material on the net I set the below environment
> variables as well but to no use.
>
> GDAL_DRIVER_PATH=C:Program FilesGDALbingdalplugins
> GML_CONSIDER_EPSG_AS_URN=YES
You can remove GML_CONSIDER_EPSG_AS_URN which has only an influence when reading
GML, not writing GML.
>
> Does someone have any tips or tricks on how to generate or convert the
> coordinates into lat/long format?
>
> Here is the command I used.
>
> ogr2ogr -t_srs "EPSG:4283" -f "GML" output.XML input.MID
>
> Current Output
> ----
> ...<gml:coordinates>115.879512,-31.9709 115.880008,-31.970772
> 115.880448,-31.970646 ....
> -----
By default, the GML driver writes GML2.1 geometries, that traditionnaly didn't
honour EPSG axis ordering rules.
If you add -dsco FORMAT=GML3 , then you will have GML3 geometries, and by
default the coordinates for a SRS like EPSG:4283 will be written in lat/long
order (because the default value of the dataset creation option GML3_LONGSRS is
YES).
For more details on those 2 creations options, you can refer to
http://gdal.org/ogr/drv_gml.html
Best regards,
Even
More information about the gdal-dev
mailing list