<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
<br>Thank you both for your help, I have now succeeded in converting to shp and then to MySQL using pgsql2shp and then shp2mysql.<br><blockquote><hr>Date: Wed, 14 Nov 2007 08:39:39 +0700<br>From: bayu@bkurniawan.com<br>To: postgis-users@postgis.refractions.net<br>Subject: Re: [postgis-users] geometry from postgis to mysql<br><br>Try with GDAL/OGR (<a href="http://gdal.org/ogr" target="_blank">http://gdal.org/ogr</a>)<br><br>This is example to convert a data ESRI Shapefile to MySQL :<br>ogr2ogr -f MySQL MySQL:gis,user=user,password=secret shape_file.shp -lco GEOMETRY_NAME=the_geom
<br><br>Example to convert a PostGIS to MySQL :<br>
ogr2ogr&nbsp;-f&nbsp;MySQL&nbsp;MySQL:gis,user=user,password=secret&nbsp;PG:"host=<a href="http://172.27.1.245" target="_blank">172.27.1.245</a>&nbsp;user=user dbname=gis"
"map_province_boundary_polygon" -lco GEOMETRY_NAME=the_geom -a_srs
EPSG:4326 -overwrite<br><br>To check your MySQL data :<br>
ogrinfo MySQL:gis,user=root,password=root district -so<br><br>
INFO: Open of `MySQL:gis,user=user,password=secret'<br>
using driver `MySQL' successful.<br>
Layer name: district<br>
Geometry: Polygon<br>
Feature Count: 6<br>
Extent: (105.096718, -6.998588) - (106.774400, -5.875104)<br>
Layer SRS WKT:<br>
(unknown)<br>
FID Column = OGR_FID<br>
Geometry Column = the_geom<br>
district: String (50.0)<br>
province: String (50.0)<br>
class: String (50.0)<br><br><div><span class="EC_gmail_quote">On 11/12/07, <b class="EC_gmail_sendername"><a href="mailto:Kyle.Wilcox@noaa.gov">Kyle.Wilcox@noaa.gov</a></b> &lt;<a href="mailto:Kyle.Wilcox@noaa.gov">Kyle.Wilcox@noaa.gov
</a>&gt; wrote:</span><blockquote class="EC_gmail_quote" style="padding-left: 1ex;">Have you tried using pgsql2shp and then shp2mysql?<br><br>----- Original Message -----
<br>From: tashjp &lt;<a href="mailto:tashjp@hotmail.com">tashjp@hotmail.com</a>&gt;<br>Date: Sunday, November 11, 2007 4:38 pm<br>Subject: [postgis-users] geometry from postgis to mysql<br><br>&gt;<br>&gt; I had a go posting this in the MySQL forum but with no luck...
<br>&gt; I have a PostGIS database with various columns of geometry data. I<br>&gt; need to<br>&gt; import all this into a MySQL database instead (my uni won't run<br>&gt; PostGIS on<br>&gt; their servers) and have decided to create the tables from scratch
<br>&gt; and then<br>&gt; just do a search and replace on the insert statements to convert from<br>&gt; Postgre to MySQL.<br>&gt;<br>&gt; I have tried both<br>&gt;<br>&gt; INSERT INTO RoadNode VALUES ('osgb4000000029762763', 3, '2005-09-14',
<br>&gt; 'osgb1000001824287062',<br>&gt; 'GeomFromWKB(0101000000000000008A2B204100000000B07EF940)');<br>&gt;<br>&gt; and<br>&gt;<br>&gt; INSERT INTO RoadNode VALUES ('osgb4000000029762711', 3, '2005-09-14',
<br>&gt; 'osgb1000001824287705',<br>'010100000000000000082C2041000000006070F940');<br>&gt;<br>&gt; both of which return the error message:<br>&gt; &gt;[Error] Script lines: 1-1 --------------------------<br>
&gt; Data truncation: Cannot get geometry object from data you send to the<br>&gt; GEOMETRY field<br>&gt;<br>&gt; Does anyone know what I am doing wrong?<br>&gt;<br>&gt; Thanks, Natasha<br>&gt; --<br>&gt; View this message in context: 
<a href="http://www.nabble.com/geometry-from-" target="_blank">http://www.nabble.com/geometry-from-</a><br>&gt; postgis-to-mysql-tf4787330.html#a13695426<br>&gt; Sent from the PostGIS - User mailing list archive at <a href="http://Nabble.com" target="_blank">
Nabble.com</a>.<br>&gt;<br>&gt; _______________________________________________<br>&gt; postgis-users mailing list<br>&gt; <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
&gt; <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>&gt;<br>_______________________________________________<br>postgis-users mailing list
<br><a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users
</a><br></blockquote></div><br><br clear="all"><br>-- <br>Bayu Kurniawan R<br>GIS Programmer<br>PT. Sigma Cipta Utama<br>Jl. Tekno I Blok B No:5,6,7<br>BSD City Tangerang 15314<br>Indonesia<br>Phone : +62 21 75871955 ext.304

</blockquote><br /><hr />Get free emoticon packs and customisation from Windows Live.  <a href='http://www.pimpmylive.co.uk' target='_new'>Pimp My Live!</a></body>
</html>