[postgis-users] Size of .dbf file produced with pgsql2shp
Mark Cave-Ayland
mark.cave-ayland at siriusit.co.uk
Mon Sep 13 09:06:38 PDT 2010
Denis Rykov wrote:
> I've try to get exit code with my python script:
>
> import os
> code = os.system("pgsql2shp -f dagestan.shp -h gis-lab.info
> <http://gis-lab.info/> -u labinfo -P *** osm \"SELECT
^^
> st_intersection as geom from dagestan_point_attr WHERE
> highway='bus_stop'")
> print code
>
> At result I've got 256 (not 2 as expected).
Hmmmm looks like you're missing an escaped quote somewhere? If your "svn
up" worked, the exit code should be either 0 or 1. To test from bash:
pgsql2shp -f dagestan.shp .... "SELECT st_intersection as geom from
dagestan_point_attr WHERE highway='bus_stop'"
echo $?
HTH,
Mark.
--
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063
Sirius Labs: http://www.siriusit.co.uk/labs
More information about the postgis-users
mailing list