Difference between revisions of "LINZ and GIS"
From zen2
| (4 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
http://postgis.net/ PostGIS will help a lot here | 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 | ||
| + | |||
<pre> | <pre> | ||
| Line 9: | Line 14: | ||
sudo apt-get install postgresql-9.6 | sudo apt-get install postgresql-9.6 | ||
sudo apt-get install postgresql-9.6-postgis-2.3 postgresql-contrib-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 | ||
| + | </pre> | ||
| + | |||
| + | While in terminal, log in to the psql console as postgres user: | ||
| + | <pre> | ||
| + | sudo -u postgres psql | ||
| + | |||
| + | CREATE EXTENSION adminpack; | ||
| + | </pre> | ||
| + | |||
| + | <pre> | ||
| + | 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; | ||
| + | </pre> | ||
| + | |||
| + | Exit the psql console: | ||
| + | <pre> | ||
| + | \q | ||
| + | </pre> | ||
| + | |||
| + | Install ogrinfo | ||
| + | <pre> | ||
| + | sudo apt-get install gdal-bin | ||
</pre> | </pre> | ||
| + | http://www.linz.govt.nz/system/files_force/media/pages-attachments/Importing-LDS-CSV-data-into-your-database.pdf | ||
Latest revision as of 05:17, 4 July 2017
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
