[postgis-users] Size of .dbf file produced with pgsql2shp

Denis Rykov rykovd at gmail.com
Mon Sep 13 09:18:38 PDT 2010


Mark, thanks for quick response, I've try to do it with bash:

[sim at gis ~/gl/projects/osmrus]$ pgsql2shp -u pgsql -f dagestan.shp osm
"SELECT st_intersection as geom from dagestan_point_attr WHERE
highway='bus_stop'"
Initializing...
ERROR: Could not determine table metadata (empty table)
[sim at gis ~/gl/projects/osmrus]$ echo $?
1

But you wrote that

> exit code of 0 on success, and 2
> if 0 records were processed
>
> Why I get 1, but not 2?
On Mon, Sep 13, 2010 at 11:06 PM, Mark Cave-Ayland <
mark.cave-ayland at siriusit.co.uk> wrote:

> 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
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100913/932c6033/attachment.html>


More information about the postgis-users mailing list