[postgis-users] shp2pgsql problem with Leopard

David Garbin dgarbin at verizon.net
Sun Dec 30 10:58:53 PST 2007


Thanks for all the quick replies.  About the table name issue, I  
believe the argument "dgarbin.dtl_cnty" is the table name (schema  
qualified).  If my syntax is wrong, let me know.

On Dec 30, 2007, at 12:08 PM, david.techer at davidgis.fr wrote:

> Hi David,
>
> Did U try to specify a table name
>
> shp2pgsql <your/options> <path/to/shapefile> <table> |psql ...
>
> Quoting David Garbin <dgarbin at verizon.net>:
>
>> I am using PostgreSQL/Postgis with Leopard using the latest Kyng  
>> Chaos
>> binaries.  Everything appears to be working well except shp2pgsql.
>> When I try to load a shapefile, it just gives me the help screen (see
>> below):
>>
>> [Big-Mac:~] dgarbin% /usr/local/pgsql/bin/shp2pgsql -D -s 4269 -i -I
>> /Users/dgarbin/grass/Shapefiles/dtl_cnty.shp dgarbin.dtl_cnty |
>> /usr/local/pgsql/bin/psql -d networx
>> RCSID: $Id: shp2pgsql.c 2717 2007-11-23 10:42:09Z mcayland $  
>> RELEASE: 1.3.2
>> USAGE: /usr/local/pgsql/bin/shp2pgsql [<options>] <shapefile>
>> [<schema>.]<table>
>> OPTIONS:
>>  -s <srid>  Set the SRID field. If not specified it defaults to -1.
>>  (-d|a|c|p) These are mutually exclusive options:
>>      -d  Drops the table, then recreates it and populates
>>          it with current shape file data.
>>      -a  Appends shape file into current table, must be
>>          exactly the same table schema.
>>      -c  Creates a new table and populates it, this is the
>>          default if you do not specify any options.
>>      -p  Prepare mode, only creates the table.
>>  -g <geometry_column> Specify the name of the geometry column
>>     (mostly useful in append mode).
>>  -D  Use postgresql dump format (defaults to sql insert statments.
>>  -k  Keep postgresql identifiers case.
>>  -i  Use int4 type for all integer dbf fields.
>>  -I  Create a GiST index on the geometry column.
>>  -S  Generate simple geometries instead of MULTI geometries.
>>  -w  Use wkt format (for postgis-0.x support - drops M - drifts   
>> coordinates).
>>  -W <encoding> Specify the character encoding of Shape's
>>     attribute column. (default : "ASCII")
>>  -N <policy> Specify NULL geometries handling policy  
>> (insert,skip,abort)
>>  -? Display this help screen
>> [Big-Mac:~] dgarbin%
>>
>>
>> There seems to be a problem reading parameters.  If I just specify  
>> the
>> -? option, it says "No match".
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list