Dear All:
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.
Here is my codes.

import os, string
Psql= 'C:\\temp\\bin\\psql.exe '
shapefile='C:\\X_GUAN\\data\\bc_border.shp'
sqlfile= 'C:\\test.sql'
options= "-s 4326 -i -I "
Shp2pgsql='C:\\temp\\bin\\shp2pgsql.exe '
cmd = Shp2pgsql + options + shapefile + ' test > ' + sqlfile
os.system(cmd)

cmd2 = Psql + '-d databaseTest -f ' + sqlfile
os.system(cmd2)

Thanks in advance

All the best

Xiaoyu




-- 
Xiaoyu Guan (Sam)
Geo-information Science
Wageningen UR
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to