Project

General

Profile

Shapefiles » History » Version 1

Philippe May, 04/11/2016 22:50

1 1 Philippe May
h1. Shapefiles
2 1 Philippe May
3 1 Philippe May
h2. QGis
4 1 Philippe May
5 1 Philippe May
Qgis can be used to import Shapefiles to the database. It's dead easy, just drag and drop the files (from the Browser Panel -> Home/...) to the database connection.
6 1 Philippe May
7 1 Philippe May
However, it doesn't set the geometry features metadata to the proper SRID (32644 in our case), leading to difficulties fetching the proper coordinates.
8 1 Philippe May
9 1 Philippe May
One way around it is to force the geomety in the imported tables with the Postgis UpdateGeometrySRID function, like so:
10 1 Philippe May
<pre>
11 1 Philippe May
psql -U avgis -d avgis -h server.gis.av -c "select UpdateGeometrySRID('public', 'wells', 'geom', 32644) ;"
12 1 Philippe May
</pre>