Getting PostGIS 1.5.3 working with Postgresql90 (Macports)
| От | René Fournier |
|---|---|
| Тема | Getting PostGIS 1.5.3 working with Postgresql90 (Macports) |
| Дата | |
| Msg-id | 624C6BF2-689F-49CF-8909-2E523FBFFD03@gmail.com обсуждение |
| Ответы |
Re: Getting PostGIS 1.5.3 working with Postgresql90 (Macports)
|
| Список | pgsql-general |
What I want to do is import some shape files, using the shp2pgsql loader. However, I need a database first, and I've read I need to make it spatially aware, which means creating it from the "template_postgis". All the docs I read indicate that template_postgis should be present after installing PostGIS. But… When I try to create a database from that template, I'm told it's missing.
> createdb -T template_postgis demo -U postgrescreatedb: database creation failed: ERROR: template database "template_postgis" does not exist
I've found tutorials on creating your own postgis template ( http://www.lincolnritter.com/blog/2007/12/04/installing-postgresql-postgis-and-more-on-os-x-leopard/ ), but I'd like to use what appears to be the standard one. Actually, I wondered if PostGIS was even running (Macports indicates it's installed and active):
> sudo port installed | grep postgpostgis @1.5.3_0+postgresql90 (active)postgresql90 @9.0.5_0 (active)postgresql90-server @9.0.5_0 (active)postgresql_select @0.1_0 (active)
I tried importing a SHP file anyway:
> shp2pgsql -c -D -s 4269 -i -I demo.shp | psql -d demo -U postgres
Shapefile type: ArcPostgis type: MULTILINESTRING[2]SETSETBEGINNOTICE: CREATE TABLE will create implicit sequence "nrn_ab_8_0_roadseg_gid_seq" for serial column "nrn_ab_8_0_roadseg.gid"NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "nrn_ab_8_0_roadseg_pkey" for table "nrn_ab_8_0_roadseg"CREATE TABLEERROR: function addgeometrycolumn(unknown, unknown, unknown, unknown, unknown, integer) does not existLINE 1: SELECT AddGeometryColumn('','nrn_ab_8_0_roadseg','the_geom',...^HINT: No function matches the given name and argument types. You might need to add explicit type casts.ERROR: current transaction is aborted, commands ignored until end of transaction block
Appears as though Postgis isn't even 'there'.
(Sorry, I'm a MySQL guy. I'm just trying to get started without asking too many dumb questions.)
Best regards,
René Fournier
В списке pgsql-general по дате отправления: