[postgis-users] ogr2ogr GMT to Pg result is rotated -90

Puneet Kishor punk.kish at gmail.com
Wed Sep 14 15:06:46 PDT 2011


On Sep 14, 2011, at 4:17 PM, Puneet Kishor wrote:

> I inherited a bunch of GMT files, so I converted them to Pg using ogr2ogr
> 
>    $ogr2ogr -f "PostgreSQL" PG:".." -a_srs "EPSG:4326" <file>.gmt -nln schema.table
> 
> Interestingly, the result is rotated -90 deg. Any idea why that happened and how I could correct it?


Small update... the result is not really rotated -90, but it looks like lat and lng have gotten flipped. The raw data has lat, lng, and perhaps ogr2ogr was expecting lng, lat? If so, is there an option to flip the data as it converts?


> 
> Also, I was expecting these files to convert into POLYGONs, however the resulting geometry was POINTs. Is there a way I could have ogr2ogr force the data into POLYGONs?
> 
> Puneet.
> 




More information about the postgis-users mailing list