[postgis-users] Installing PostGIS-1.4.1

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Fri Jan 15 03:52:54 PST 2010


Torsten Mohr wrote:

> Hello,
> 
> thanks for your answers.  It is some time ago that i used SQL, but this looks
> strange to me, PostgresQL only contains two empty tables:
> 
> To set up PostGIS i did:
> 
> createdb -E UTF8 -O tmohr gis
> createlang plpgsql gis
> psql -f postgis/postgis.sql
> 
> This lead to quite many warnings.  Postgres mentions that it skips several
> things.  The log is below.
> 
> So i tried:
> postgres at schleim:/local/ftp/osm> psql -d gis
> psql (8.4.1)
> Type "help" for help.
> 
> gis=# \d
>               List of relations
>  Schema |       Name       | Type  |  Owner
> --------+------------------+-------+----------
>  public | geometry_columns | table | postgres
>  public | spatial_ref_sys  | table | postgres
> (2 rows)
> 
> gis=# select * from spatial_ref_sys;
>  srid | auth_name | auth_srid | srtext | proj4text
> ------+-----------+-----------+--------+-----------
> (0 rows)
> 
> gis=# select * from geometry_columns;
>  f_table_catalog | f_table_schema | f_table_name | f_geometry_column | 
> coord_dimension | srid | type
> -----------------+----------------+--------------+-------------------+-----------------+------+------
> (0 rows)
> 
> 
> 
> The tables are all empty, is that ok?  I fear that something went wrong here,
> as osm2pgsql dies early with the warning that several tables don't exist:
> 
> 
> postgres at schleim:/local/ftp/osm> osm2pgsql planet-090408.osm.bz2
> osm2pgsql SVN version 0.69-19517
> 
> Using projection SRS 900913 (Spherical Mercator)
> Setting up table: planet_osm_point
> HINWEIS:  Tabelle »planet_osm_point« existiert nicht, wird übersprungen
> HINWEIS:  Tabelle »planet_osm_point_tmp« existiert nicht, wird übersprungen
> SELECT AddGeometryColumn('planet_osm_point', 'way', 900913, 'POINT', 2 );
>  failed: FEHLER:  AddGeometryColumns() - invalid SRID
> CONTEXT:  SQL statement "SELECT AddGeometryColumn('','', $1 , $2 , $3 , $4 , 
> $5 )"
> PL/pgSQL-Funktion »addgeometrycolumn« Zeile 5 bei SQL-Anweisung
> 
> Error occurred, cleaning up
> 
> 
> 
> Isn't that a sign that something more basic went wrong?
> 
> 
> Thanks for any hints,
> Torsten.

You've missed just one thing after your PostGIS setup:

psql -d gis -f spatial_ref_sys.sql

Once you've done this you should then be able to see the entries in the 
spatial_ref_sys table with "select * from spatial_ref_sys;".


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



More information about the postgis-users mailing list