<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>