8

ツールosm2pgsqlを使用して、管理ツールとしてphppgadminを使用してosmファイルをpostgresデータベースにインポートしています。私はosmからxml形式で小さな町をダウンロードしただけで、Macのターミナルを使用してそれをインポートするのに問題があります. 私はこれに少し慣れていないので、どんな助けでも大歓迎です。私はいくつかの記事を見てきましたが、私のニーズを満たすために必要な明確さを提供するものはありません.

ありがとう

このエラーが発生するのは、わからない小さなことかもしれません..

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.
4

2 に答える 2

7

postgis 拡張機能を postgres データベースにインストールする必要があります。マシンに postgis がインストールされていると仮定すると、次のようなことを行う必要があります。

psql <database> < /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql

への正確なパスpostgis.sqlは、使用しているディストリビューションと、postgis のパッケージ方法によって異なります。次のようなコマンドを使用して、空間参照系テーブルをインストールする必要がある場合もあります。

psql <database> < /usr/share/postgresql/8.4/contrib/postgis-1.5/spatial_ref_sys.sql
于 2011-07-01T10:49:26.697 に答える