[postgis-users] shp2pgsql not loading in 0.8.2
Seamus Thomas Carroll
carrolls at cpsc.ucalgary.ca
Thu Jan 15 11:46:39 PST 2004
Hi,
As you can see in the output, shp2pgsql 0.8.0 worked. All output
redirected into toload.sql. BCrte.shp is also loaded into the database
using psql.
Below is output from the database showing that bcrte has been imported,
Thanks Seamus
noschema=# \d
List of relations
Schema | Name | Type | Owner
--------+------------------+----------+----------
public | bcrte | table | carrolls
public | bcrte_gid_seq | sequence | carrolls
public | geometry_columns | table | carrolls
public | hope | table | carrolls
public | spatial_ref_sys | table | carrolls
noschema=# \d bcrte
Table "public.bcrte"
Column | Type | Modifiers
------------+-------------------+--------------------------------------------------------
gid | integer | not null default nextval('public.bcrte_gid_seq'::text)
street | character varying |
fromleft | integer |
toleft | integer |
fromright | integer |
toright | integer |
predir | character varying |
pretype | character varying |
streetname | character varying |
suftype | character varying |
sufdir | character varying |
carto | integer |
left_mun | character varying |
right_mun | character varying |
left_maf | character varying |
right_maf | character varying |
left_fsa | character varying |
right_fsa | character varying |
left_prv | character varying |
right_prv | character varying |
uniqueid | integer |
oneway | character varying |
rte_hirchy | integer |
road_dir | character varying |
fromnode | integer |
tonode | integer |
speedmiles | integer |
rdlenmiles | double precision |
speedkm | integer |
rdlenmeter | double precision |
traveltime | double precision |
rdlnmlselv | double precision |
rdlnmtrelv | double precision |
trvltimelv | double precision |
the_geom | geometry |
Indexes:
"bcrte_pkey" primary key, btree (gid)
Check constraints:
"$1" CHECK (srid(the_geom) = -1)
"$2" CHECK (geometrytype(the_geom) = 'MULTILINESTRING'::text OR
the_geom IS NULL)
On Thu, 15 Jan 2004, strk wrote:
> carrolls wrote:
> > Hi,
> >
> > I have been playing with postgis 0.8.2 and it now gives me an error when
> > running shp2pgsql when 0.8.1 did not. I am trying to load dmti spatial
> > data on the BC road network. I have provided outputs comparing the two
> > versions below.
> >
> > carrolls at ict715b:> /scratch/postgresql-7.4/contrib/postgis-0.8.0/loader/shp2pgsql
> > /home/vraid2/carrolls/dmti/AB_BC_MB_SK/ArcView/Nad83/CanMapRL/BC/Streets/BCrte.shp
> > BCrte noschema > toload.sql
> > carrolls at ict715b:> /scratch/postgresql-7.4/contrib/postgis-0.8.1/loader/shp2pgsql
> > /home/vraid2/carrolls/dmti/AB_BC_MB_SK/ArcView/Nad83/CanMapRL/BC/Streets/BCrte.shp
> > BCrte > toload.sql
> > Error: field 20 has invalid or unknown field type (3)
>
> Type 3 is a Logical type in dbf. I don't think it was supported before.
> Are you ure it did actually work with previous shp2pgsql versions ?
>
> >
> > I noticed that AddGeometryColumn now allows for schemas which is great but
> > shp2pgsql.c v1.45 0.8.2 does not appears to allow for schemas. Am I
> > missing a simple way of loading shape files into specific schemas other
> > than editing the created sql statements? Could an extra arguement be
> > added to shp2pgsql for the schema and if one is not given
> > default to the public schema?
>
> The simplest way is sourcing shp2pgsql output after having set your
> search_path starting with the schema you want the geometry tables
> to be created. AddGeometryColumn will use current_schema() which
> in turn will return the first schema in the comma-separated list
> in search_path.
>
> --strk;
> >
> > Seamus
> >
> >
> > _______________________________________________
> > 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