Download presentation
Presentation is loading. Please wait.
1
Installing PostgreSQL/PostGIS Loading data manually
Gerrit Hendriksen
2
Installing PostgreSQL/PostGIS
Step 1. Get PostgreSQL from (Tip, get the Interactive installer by EnterpriseDB for Windows, for Linux, follow the recipe from the website) Step 2. Install via the installer and use the stackbuilder to install PostGIS Tip! Remember your credentials
3
Manuals PostgreSQL PDF format: Online: PostGIS: PDF format: Online: Check the cheat sheets of Boston GIS Also check
4
Create your first database
Start pgAdminIII (there is a 4 version which is a bit different, for now we use pgAdminIII Create new database Open the query window () Install postgis by typing Create extension postgis; Create extension postgis_topology; Press or Ctrl + E Explore what you have right now (> 1000 GIS functions)
5
Datamodel Create tables and relations
--start DDL CREATE SEQUENCE public.parameter_parameterid_seq; CREATE TABLE public.parameter ( parameterid INTEGER NOT NULL DEFAULT nextval('public.parameter_parameterid_seq'), name VARCHAR(50) NOT NULL, unit VARCHAR(20) NOT NULL, CONSTRAINT parameter_pk PRIMARY KEY (parameterid) ); Complete query can be retrieved form search for PostgreSQL DSD2016
6
How to load data manually
Check the data you have Create temporary table using the header of the dataset Create table tempdata () Create Table tempdata( cruise character varying(50), station character varying(50), type character varying(2), adate timestamp, latitude_degrees_north float, longitude_degrees_east float, bot_depth_m float, pres_db float, temp_deg_c float, psal_psu float)
7
Load the data Right click the table Choose import
8
Load data manually Fill Table parameter (with unique parameter list)
Fill Table icesstations (with unique stations) Add geometry to the icesstations table Fill Table oceanography
9
The process Demo: Install PostgreSQL/PostGIS Create database
Enable PostGIS extension Show what you get Create tables using the datamodel published on OpenEarth site Load data in database Transform data to datamodel Do some queries
10
Afternoon session Various sessions possible: Further handling of data
Advanced queries (spatial queries) Combinations with PostgreSQL/PostGIS: QGIS Scripting with Python/R/Matlab Further ETL’ing Anything you want …
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.