Re: [postgis-users] Moving geometry from MySQL to PostGIS

2011-09-01 Thread Martin Davis

You might also like to have a look at JEQL:

http://tsusiatsoftware.net/jeql/main.html

ETL between spatial databases is one intended use case for this product.

The manual page on JEQL database access is here:

http://tsusiatsoftware.net/jeql/libref/cmd-db.html

Martin

On 8/30/2011 7:10 AM, Mr. Puneet Kishor wrote:

  Yet, surprising that either a need for this is not as common as I thought it 
might be, or it is sufficiently variable to preclude a readymade tool to do the 
job.



___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Moving geometry from MySQL to PostGIS

2011-08-30 Thread Charles Galpin

On Aug 29, 2011, at 2:29 PM, Mr. Puneet Kishor wrote:
 
 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.

How about generating insert statements compatible with postgresql, using wkt as 
the common format that you can then run on postgresql? ___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Moving geometry from MySQL to PostGIS

2011-08-30 Thread Mr. Puneet Kishor

On Aug 30, 2011, at 8:58 AM, Charles Galpin wrote:

 
 On Aug 29, 2011, at 2:29 PM, Mr. Puneet Kishor wrote:
 
 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.
 
 How about generating insert statements compatible with postgresql, using wkt 
 as the common format that you can then run on postgresql? 

Since this is a one-time job, I think I will open two db handles in Perl and 
query one and insert in the other. That will work. Yet, surprising that either 
a need for this is not as common as I thought it might be, or it is 
sufficiently variable to preclude a readymade tool to do the job.

Thanks for the ideas,

--
Puneet Kishor

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Moving geometry from MySQL to PostGIS

2011-08-30 Thread Charles Galpin

On Aug 30, 2011, at 10:10 AM, Mr. Puneet Kishor wrote:

 Since this is a one-time job, I think I will open two db handles in Perl and 
 query one and insert in the other. That will work. Yet, surprising that 
 either a need for this is not as common as I thought it might be, or it is 
 sufficiently variable to preclude a readymade tool to do the job.

Yeah probably as quick as anything else.  Or try kettle perhaps 
(http://kettle.pentaho.com/) ___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Moving geometry from MySQL to PostGIS

2011-08-30 Thread Stephen Woodbridge

On 8/30/2011 10:10 AM, Mr. Puneet Kishor wrote:


On Aug 30, 2011, at 8:58 AM, Charles Galpin wrote:



On Aug 29, 2011, at 2:29 PM, Mr. Puneet Kishor wrote:


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.


How about generating insert statements compatible with postgresql, using wkt as 
the common format that you can then run on postgresql?


Since this is a one-time job, I think I will open two db handles in Perl and 
query one and insert in the other. That will work. Yet, surprising that either 
a need for this is not as common as I thought it might be, or it is 
sufficiently variable to preclude a readymade tool to do the job.

Thanks for the ideas,


Can you do this in ogr2ogr?
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Moving geometry from MySQL to PostGIS

2011-08-29 Thread Mr. Puneet Kishor

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.

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Moving geometry from MySQL to PostGIS

2011-08-28 Thread Thomas Gratier
Hello,

Have a look on GDAL (compiled with PostgreSQL and Spatialite libs)
For MySQL e.g http://www.gdal.org/ogr/drv_mysql.html or PostGIS
http://www.gdal.org/ogr/drv_pg.html

You can use OpenLite beta utility too
http://www.gaia-gis.it/OpenLite/index.html

Regards

Thomas Gratier
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Moving geometry from MySQL to PostGIS

2011-08-28 Thread Mr . Puneet Kishor
Hello,

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?

On Aug 26, 2011, at 3:23 PM, Mr. Puneet Kishor wrote:

 Suggestions? What is the quickest, cleanest way to do this?
 
 
 --
 Puneet Kishor 
 

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Moving geometry from MySQL to PostGIS

2011-08-28 Thread Charles Galpin

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?___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Moving geometry from MySQL to PostGIS

2011-08-28 Thread David Fawcett
Puneet, 

Maybe try a GDAL instance compiled with MySQL support?

David.



On Aug 28, 2011, at 4:47 PM, Mr. Puneet Kishor punk.k...@gmail.com wrote:

 Hello,
 
 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?
 
 On Aug 26, 2011, at 3:23 PM, Mr. Puneet Kishor wrote:
 
 Suggestions? What is the quickest, cleanest way to do this?
 
 
 --
 Puneet Kishor 
 
 
 ___
 postgis-users mailing list
 postgis-users@postgis.refractions.net
 http://postgis.refractions.net/mailman/listinfo/postgis-users
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] Moving geometry from MySQL to PostGIS

2011-08-26 Thread Mr. Puneet Kishor
Suggestions? What is the quickest, cleanest way to do this?


--
Puneet Kishor 

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users