Hi Xiaoyu!
It's so interesting...
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...?

Thanks..!

2008/8/21 Xiaoyu Guan <[EMAIL PROTECTED]>

> 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
>
>
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to