1, the PostgreSQL database indicates the use of lowercase, the table name can not use uppercase, otherwise it will not be recognized.
2. Before data import, you need to add space extension function to the database you need to import.
3, when using PostGIS shapfile and DB loader plug-in, the selected SHP file path cannot have Chinese, the path can not be too complicated. Otherwise, the DBF file (. dbf) can is not opened error.
4, import the default encoding is UTF-8, need to change to GBK, otherwise will error.
5, according to the above steps, the basic can be imported successfully.
6. The successful import of SHP file name will automatically become a lowercase name, and use the table name. As shown, the result of the data import.
Export of SHP
The export of SHP is actually using the Bin\pgsql2shp.exe
1, attention to coding problems, because the exported options have no encoding option to choose Settings.
Try 1): Enter Psql console to modify the client character set, the results are invalid, set to GBK after the SHP attribute table is still garbled in Chinese
--Modify the client character set
postgres=# show client_encoding;
Client_encoding UTF8
(1 row)
postgres=# set client_encoding= ' GBK ';
SET
Try 2): Set the system environment variable PGCLIENTENCODING=GBK, exit PostgreSQL re-login, execute successfully!.
Note: Coding issues, because the exported options do not have an encoding option available for setup.
Then the export operation is performed and the export prompt succeeds.
Use ArcMap to open the data for viewing.
The exported data does not have a. prj file, and it needs to be set up with Arccatalog.
The article also mentions the use of the command line import and export method, for the time being no attempt, the future needs to be studied.
Contact: qq--56524046 e-mail: [Email protected]
To undertake GIS outsourcing, GIS data processing and other services.
Provide GIS solutions, technical guidance and so on.
PostGIS Import and export shp considerations