- Mastering PostGIS
- Dominik Mikiewicz Michal Mackiewicz Tomasz Nycz
- 145字
- 2021-07-02 22:52:21
Importing shape files using shp2pgsql
ESRI shapefile (SHP) is still the most common exchange format for sharing GIS data. The format itself is made of a few files such as SHP, SHX, DBF, andPRJ, where the first three are the required files and the file with projection information is not obligatory.
The standard PostGIS tool for loading shapefiles is shp2pgsql - you will find it in the bin folder of your postgres installation. shp2pgsql is a command-line utility that can either extract the shapefile data into SQL or pipe the output directly into psql (we'll see both approaches). shp2pgsql also has a GUI version that can be accessed directly in PgAdmin.
In this example, we'll use some NaturalEarth shapefiles we downloaded earlier. We will import the coastlines shapefile using the CMD version of shp2pgsql and then we'll add land masses using the GUI version.
- 輕松學Java Web開發
- 協作機器人技術及應用
- 大數據安全與隱私保護
- 系統安裝與重裝
- 工業機器人運動仿真編程實踐:基于Android和OpenGL
- OpenStack Cloud Computing Cookbook
- SQL Server數據庫應用基礎(第2版)
- Java組件設計
- SolarWinds Server & Application Monitor:Deployment and Administration
- CAD應用程序開發詳解
- 亮劍.NET:圖解ASP.NET網站開發實戰
- Mastering Kubernetes
- 數據倉庫結構設計與實施
- Bazaar Version Control
- 工業機器人技術基礎