[gdal-dev] RE: Conversion of MapInfo to GML using ogr2ogr - lat/long format issue

mysticraja shrikant.sundaram at accenture.com
Thu Dec 22 17:45:53 EST 2011

Thanks Guys..

The following command helped me achieve it.

ogr2ogr -dsco FORMAT=GML3 -t_srs "EPSG:4283" -f "GML" <output.xml> <input.MID>

From: Even Rouault [via OSGeo.org] [mailto:ml-node+s1803224n7117977h45 at n2.nabble.com]
Sent: Thursday, 22 December 2011 8:10 PM
To: Sundaram, Shrikant
Subject: Re: Conversion of MapInfo to GML using ogr2ogr - lat/long format issue


> 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

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

For more details on those 2 creations options, you can refer to

Best regards,

gdal-dev mailing list
[hidden email]</user/SendEmail.jtp?type=node&node=7117977&i=0>

If you reply to this email, your message will be added to the discussion below:
To unsubscribe from Conversion of MapInfo to GML using ogr2ogr - lat/long format issue, click here<http://osgeo-org.1803224.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7117273&code=c2hyaWthbnQuc3VuZGFyYW1AYWNjZW50dXJlLmNvbXw3MTE3MjczfC03ODg4MTI0NjQ=>.

Subject to local law, communications with Accenture and its affiliates including telephone calls and emails (including content), may be monitored by our systems for the purposes of security and the assessment of internal compliance with Accenture policy.


View this message in context: http://osgeo-org.1803224.n2.nabble.com/Conversion-of-MapInfo-to-GML-using-ogr2ogr-lat-long-format-issue-tp7117273p7120230.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20111222/c1ce33c8/attachment.html

More information about the gdal-dev mailing list