使用工具osm2pgsql將phm文件作爲管理工具導入到postgres數據庫中。我只從osm下載了一個xml格式的小鎮,並且無法使用mac上的終端導入它。林有點小白在這個,所以任何幫助將不勝感激。我看了幾篇文章,但沒有提供我需要的清晰度以滿足我的需求。將osm文件導入postgres/postgis數據庫
感謝
即時得到這個錯誤可能是一些小的不知道..
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.
我執行這些sql文件,我現在有所有需要的功能。感謝那btw。即時通訊仍然不知道如何使用osm2pgsql進行導入。謝謝 – John
當我嘗試執行'postgis.sql'時,出現錯誤'Type「球體」已存在「。我該如何解決它? –
在postgresql 9和postgis 2版本中,這是通過以下方式完成的:CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology; [更多信息](https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/postgis/) –