This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to setup GIS Server on Debian

0

Hi everyone,

I tried to setup an GIS-Server on Debian 6 with some installation guides, but it does not work.

I've installed PostgreSQL 8.4, PostGIS & osm2pgsql. But when I start osm2pgsql, it gives an error that some tables are not available:

osm2pgsql -c -s duesseldorf.osm

and the return is

osm2pgsql SVN version 0.69-
Using projection SRS 900913 (Spherical Mercator)
Setting up table: planet_osm_point
NOTICE:  table "planet_osm_point" does not exist, skipping
NOTICE:  table "planet_osm_point_tmp" does not exist, skipping
SELECT AddGeometryColumn('planet_osm_point', 'way', 900913, 'POINT', 2 );
 failed: ERROR:  function addgeometrycolumn(unknown, unknown, integer, unknown, integer) does not exist
LINE 1: SELECT AddGeometryColumn('planet_osm_point', 'way', 900913, ...
               ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

Error occurred, cleaning up

So - where can I get the database-tables?

Thanks,

Alex

asked 22 Aug '11, 13:30

icewave's gravatar image

icewave
11224
accept rate: 0%

edited 22 Aug '11, 14:02

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273


One Answer:

1

You forgot to actually activate PostGIS features for your database. Check the wiki page on Mapnik/PostGIS installation. You are missing something like

psql -d gis -f /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql
psql -d gis -f /usr/share/postgresql/8.4/contrib/postgis-1.5/spatial_ref_sys.sql

answered 22 Aug '11, 14:05

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

edited 22 Aug '11, 14:38

Source code available on GitHub .