<div dir="ltr">Hi Xiaoyu!<br>It's so interesting...<br>I need the same but my shp files comes from Argis...  Can I use this scrip for convert the shapes files on my html file...?<br><br>Thanks..!<br><br><div class="gmail_quote">
2008/8/21 Xiaoyu Guan <span dir="ltr"><<a href="mailto:guanxiaoyu@gmail.com">guanxiaoyu@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr">Dear All:<br>I wrote a small python script which could convert shapefile to sql. I still wondering it is possible to run this kind of tool on Apache + Mod_python. <br>Here is my codes. <br><br>import os, string<br>

Psql= 'C:\\temp\\bin\\psql.exe '<br>shapefile='C:\\X_GUAN\\data\\bc_border.shp'<br>sqlfile= 'C:\\test.sql'<br>options= "-s 4326 -i -I "<br>Shp2pgsql='C:\\temp\\bin\\shp2pgsql.exe '<br>

cmd = Shp2pgsql + options + shapefile + ' test > ' + sqlfile<br>os.system(cmd)<br><br>cmd2 = Psql + '-d databaseTest -f ' + sqlfile<br>os.system(cmd2)<br><br>Thanks in advance<br><br>All the best <br><br>

Xiaoyu<br><br><br><br clear="all"><br>-- <br>Xiaoyu Guan (Sam)<br>Geo-information Science<br>Wageningen UR<br><br>
</div>
<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>
<br></blockquote></div><br></div>