[postgis-users] Moving geometry from MySQL to PostGIS

Mr. Puneet Kishor punk.kish at gmail.com
Mon Aug 29 11:29:57 PDT 2011


On Aug 28, 2011, at 8:01 PM, Charles Galpin wrote:

> 
> On Aug 28, 2011, at 5:47 PM, Mr. Puneet Kishor wrote:
> 
>> I have inherited a bunch of spatial data in MySQL, and I need to move it to PostGIS for testing and comparison. Suggestions on how this could be done without corrupting the data?
> 
> Can you give us an example of what the data looks like in mysql?

the data themselves are routine points, lines and polygons (MySQL allows defining POINT, LINE, POLYGON, or the all-encompassing GEOMETRY). Other than that, there are the usual MySQL->Pg mismatches such as `mediumint` and `enum`. I tried 

`mysqldump --compatible=postgresql` but that doesn't go far enough. Hand editing of the export file seems to be required.




More information about the postgis-users mailing list