Postgres.app PostGIS 使用備忘

Mac 下安裝PostgresSQL,最簡單的方式就是用這個: http://postgresapp.com/,並且 Postgres.app 中包含了 PostGIS。 sql

參考:http://postgis.net/install/ 這才知道還要手動執行下面代碼才能 enable PostGIS shell

-- Enable PostGIS (includes raster)
CREATE EXTENSION postgis;
-- Enable Topology
CREATE EXTENSION postgis_topology;
-- fuzzy matching needed for Tiger
CREATE EXTENSION fuzzystrmatch;
-- Enable US Tiger Geocoder
CREATE EXTENSION postgis_tiger_geocoder;

psql 中執行: app

-- Enable PostGIS (includes raster)
CREATE EXTENSION postgis;
發生錯誤:

ERROR:  could not load library "/Applications/Postgres.app/Contents/MacOS/lib/rtpostgis-2.0.so": dlopen(/Applications/Postgres.app/Contents/MacOS/lib/rtpostgis-2.0.so, 10): Library not loaded: /usr/local/lib/libtiff.5.dylib
  Referenced from: /Applications/Postgres.app/Contents/MacOS/lib/libgdal.1.dylib
  Reason: image not found

解決辦法: post

brew install libtiff

在使用 ln 命令! .net

相關文章
相關標籤/搜索