[postgis-users] shp2pgsql problem with Leopard

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Sun Dec 30 09:24:28 PST 2007


On Sun, 2007-12-30 at 11:48 -0500, David Garbin wrote:
> 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".


Hi David,

I suspect you may be experiencing this problem here:
http://postgis.refractions.net/pipermail/postgis-users/2007-December/017893.html. Unfortunately we need someone with some OS X knowledge to work out a solution that can work on all platforms, and devise a patch for it :(


Kind regards,

Mark.

-- 
ILande - Open Source Consultancy
http://www.ilande.co.uk





More information about the postgis-users mailing list