Actions

LINZ and GIS

From zen2

Revision as of 05:17, 4 July 2017 by Chris (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

LINZ uses PostgreSQL, so create a machine with this on.

http://postgis.net/ PostGIS will help a lot here

http://postgis.net/install/ http://trac.osgeo.org/ubuntugis/wiki/UbuntuGISRepository http://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS23UbuntuPGSQL96Apt


sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ubuntugis/ppa

sudo apt-get install postgresql-9.6
sudo apt-get install postgresql-9.6-postgis-2.3 postgresql-contrib-9.6

#to get the commandline tools shp2pgsql, raster2pgsql you need to do this
sudo apt-get install postgis

# Install pgRouting 2.3 package 
sudo apt-get install postgresql-9.6-pgrouting

While in terminal, log in to the psql console as postgres user:

sudo -u postgres psql

CREATE EXTENSION adminpack;
CREATE DATABASE gisdb;
\connect gisdb;

CREATE SCHEMA postgis;
ALTER DATABASE gisdb SET search_path=public, postgis, contrib;
\connect gisdb;  -- this is to force new search path to take effect
CREATE EXTENSION postgis SCHEMA postgis;
CREATE EXTENSION postgis_sfcgal SCHEMA postgis;
CREATE  EXTENSION pgrouting;

Exit the psql console:

\q

Install ogrinfo

sudo apt-get install gdal-bin

http://www.linz.govt.nz/system/files_force/media/pages-attachments/Importing-LDS-CSV-data-into-your-database.pdf