SlideShare ist ein Scribd-Unternehmen logo
1 von 33
The magic of PostgreSQL view tables
What is the task?
Existing System
How can we improve?
WaND database:
Consists of 5 tables and 7 views.
The tables store the data related to the
site geography, site information, and
constants.
The views store the calculations
performed based on the data in the
tables.
Tables:
1. indoor_water_demand: constants for demands
and percent reduction based on landuse
2. landuse: landuse lookup table
3. scenarios: building and landscape data for
parcels; multiple entries per parcel are allowed
4. sites: parcel boundary and site information
(contains geography)
5. spatial_ref_sys: default PostGIS table
Sites versus Scenarios:
sites table:
User create this (first step) as geometry
scenarios table snippet:
User fills this out as tabular data (no geometry)
Views:
1. geography_columns: default PostGIS table
2. geometry_columns: default PostGIS table
3. raster_columns: default PostGIS table
4. raster_overviews: default PostGIS table
5. scenario1_calcs: calcs for water demand and
reduction based on landuse, summed by parcel
6. scenario1_iwd: sums GFA by landuse per parcel
and joins to indoor_water_demand table
7. scenario2_calcs: calcs for water demand and
reduction based on landuse, summed by parcel
8. scenario2_iwd: sums GFA by landuse per parcel
and joins to indoor_water_demand table
9. sites_scenario1: joins calcs to geometry for map
display
10. sites_scenario2: joins calcs to geometry for map
display
scenario1_calcs view snippet:
All this is run by the database automatically as sites and
scenario1 are updated
scenario1_calcs view create SQL snippet:
Here’s a bit of what the create SQL code looks like. It is
summing the calculations by parcel number (more on next
slide).
scenario1_calcs view create SQL snippet:
This shows the nested query (derived table) that calculates the water demand and
reductions that are then used in the monthly calcs. This format allows it to be
calculated once then reused by the monthly calcs (kind of like a variable).
scenario1_iwd view snippet:
All this is run by the database automatically as sites and scenario1
are updated.
scenario1_iwd view create SQL snippet:
This code joins the indoor water demand table to the user input scenario data
based on landuse. The GFA are summed for that landuse type within the parcel.
These numbers drive the scenario1_calcs view.
In GIS
sites_scenario1 view in QGIS:
Colors and data will automatically update as the user inputs additional buildings or
landscaping into the scenario1 table. Geometry will automatically update to match sites
table.
sites_scenario1 view in ArcGIS Pro:
First you need to connect to the database.
sites_scenario1 view in ArcGIS Pro:
After connecting you can see all the tables and views. Tables without geometry can be
added to the map for viewing.
sites_scenario1 view in ArcGIS Pro:
To work with spatial tables/views, you will need to make a query layer.
sites_scenario1 view in ArcGIS Pro:
Now we have a dynamic connection to our database.
sites_scenario1 view in ArcGIS Pro:
In order to keep the data refreshed, we’ll need to adjust the caching. This will auto-
update the data, but if any fields change, the query will need to be re-run.
With linked views in ArcGIS Pro, you can compare multiple scenarios side by side.
Shown below is annual business as usual water demand
Annual design reclaimed grey wastewater supply…
In the Browser
Twitter: @bondaharper
Email: bond.harper@arup.com

Weitere ähnliche Inhalte

Was ist angesagt?

How to empower community by using GIS lecture 1
How to empower community by using GIS lecture 1How to empower community by using GIS lecture 1
How to empower community by using GIS lecture 1
wang yaohui
 
Transforming Data into Information: Supporting Dashboards with FME
Transforming Data into Information: Supporting Dashboards with FMETransforming Data into Information: Supporting Dashboards with FME
Transforming Data into Information: Supporting Dashboards with FME
Safe Software
 
My_Speadsheet_Design_Approach
My_Speadsheet_Design_ApproachMy_Speadsheet_Design_Approach
My_Speadsheet_Design_Approach
Phil Orth
 

Was ist angesagt? (20)

Applications of RS and GIS to Engineering
Applications of RS and GIS to EngineeringApplications of RS and GIS to Engineering
Applications of RS and GIS to Engineering
 
How to empower community by using GIS lecture 1
How to empower community by using GIS lecture 1How to empower community by using GIS lecture 1
How to empower community by using GIS lecture 1
 
Subsurface 3D GIS 05nov2011
Subsurface 3D GIS 05nov2011Subsurface 3D GIS 05nov2011
Subsurface 3D GIS 05nov2011
 
GeoPackage for Point Clouds
GeoPackage for Point CloudsGeoPackage for Point Clouds
GeoPackage for Point Clouds
 
The Analogues R-Package - Ramirez-Villegas
The Analogues R-Package - Ramirez-VillegasThe Analogues R-Package - Ramirez-Villegas
The Analogues R-Package - Ramirez-Villegas
 
Exercise 2
Exercise 2Exercise 2
Exercise 2
 
Map reduce presentation
Map reduce presentationMap reduce presentation
Map reduce presentation
 
Watershed Delineation Using ArcMap
Watershed Delineation Using ArcMapWatershed Delineation Using ArcMap
Watershed Delineation Using ArcMap
 
Managing Data Synchronization Between ArcSDE and POSTGIS using FME
Managing Data Synchronization Between ArcSDE and POSTGIS using FMEManaging Data Synchronization Between ArcSDE and POSTGIS using FME
Managing Data Synchronization Between ArcSDE and POSTGIS using FME
 
Transforming Data into Information: Supporting Dashboards with FME
Transforming Data into Information: Supporting Dashboards with FMETransforming Data into Information: Supporting Dashboards with FME
Transforming Data into Information: Supporting Dashboards with FME
 
Short-Haul Flights
Short-Haul FlightsShort-Haul Flights
Short-Haul Flights
 
DSD-INT 2018 Impact of flooding on critical infrastructures - Mulder
DSD-INT 2018 Impact of flooding on critical infrastructures - MulderDSD-INT 2018 Impact of flooding on critical infrastructures - Mulder
DSD-INT 2018 Impact of flooding on critical infrastructures - Mulder
 
Development of IAC CGM
Development of IAC CGMDevelopment of IAC CGM
Development of IAC CGM
 
Topology in GIS
Topology in GISTopology in GIS
Topology in GIS
 
Extension arc gis
Extension arc gisExtension arc gis
Extension arc gis
 
LIDAR and Drone Data - Datamine Discover3D
LIDAR and Drone Data - Datamine Discover3DLIDAR and Drone Data - Datamine Discover3D
LIDAR and Drone Data - Datamine Discover3D
 
Arcgis doc
Arcgis doc Arcgis doc
Arcgis doc
 
My_Speadsheet_Design_Approach
My_Speadsheet_Design_ApproachMy_Speadsheet_Design_Approach
My_Speadsheet_Design_Approach
 
CWoolley_Portfolio
CWoolley_PortfolioCWoolley_Portfolio
CWoolley_Portfolio
 
MapInfo Discover 3D for Wind Energy Resources
MapInfo Discover 3D for Wind Energy ResourcesMapInfo Discover 3D for Wind Energy Resources
MapInfo Discover 3D for Wind Energy Resources
 

Andere mochten auch (6)

Building responsive web mobile mapping applications
Building responsive web mobile mapping applicationsBuilding responsive web mobile mapping applications
Building responsive web mobile mapping applications
 
Esri Map App Builders
Esri Map App BuildersEsri Map App Builders
Esri Map App Builders
 
GIS and Civil Engineering: Esri UC
GIS and Civil Engineering: Esri UCGIS and Civil Engineering: Esri UC
GIS and Civil Engineering: Esri UC
 
Gis application in civil engineering
Gis application in civil engineeringGis application in civil engineering
Gis application in civil engineering
 
Compaction test of soil ASTM-D698
Compaction test of soil ASTM-D698Compaction test of soil ASTM-D698
Compaction test of soil ASTM-D698
 
What Is GIS?
What Is GIS?What Is GIS?
What Is GIS?
 

Ähnlich wie PostgreSQL GIS

Dsm Presentation
Dsm PresentationDsm Presentation
Dsm Presentation
richoe
 
Spatial Data with SQL Server Reporting Services
Spatial Data with SQL Server Reporting ServicesSpatial Data with SQL Server Reporting Services
Spatial Data with SQL Server Reporting Services
Mihail Mateev
 

Ähnlich wie PostgreSQL GIS (20)

Dev Summit 2011 - Talk
Dev Summit 2011 - TalkDev Summit 2011 - Talk
Dev Summit 2011 - Talk
 
Concepts and Methods of Embedding Statistical Data into Maps
Concepts and Methods of Embedding Statistical Data into MapsConcepts and Methods of Embedding Statistical Data into Maps
Concepts and Methods of Embedding Statistical Data into Maps
 
Unit 4 Data Editing.pptx
Unit 4 Data Editing.pptxUnit 4 Data Editing.pptx
Unit 4 Data Editing.pptx
 
ILWIS 3.0 SUMMARY PRESENTATION
ILWIS 3.0 SUMMARY PRESENTATIONILWIS 3.0 SUMMARY PRESENTATION
ILWIS 3.0 SUMMARY PRESENTATION
 
Co rs tutorial10
Co rs tutorial10Co rs tutorial10
Co rs tutorial10
 
Salt Lake Solar Ignite
Salt Lake Solar IgniteSalt Lake Solar Ignite
Salt Lake Solar Ignite
 
Arcgis training day_1
Arcgis training day_1Arcgis training day_1
Arcgis training day_1
 
Floodplain Modeling with LiDAR-Derived Terrain
Floodplain Modeling with LiDAR-Derived TerrainFloodplain Modeling with LiDAR-Derived Terrain
Floodplain Modeling with LiDAR-Derived Terrain
 
Scalable Data Analytics and Visualization with Cloud Optimized Services
Scalable Data Analytics and Visualization with Cloud Optimized ServicesScalable Data Analytics and Visualization with Cloud Optimized Services
Scalable Data Analytics and Visualization with Cloud Optimized Services
 
Soil and Water Assessment Tool Procedure
Soil and Water Assessment Tool ProcedureSoil and Water Assessment Tool Procedure
Soil and Water Assessment Tool Procedure
 
WaPOR Portal v2.1 - Karl Morteo - FAO - 5 May 2023
WaPOR Portal v2.1 - Karl Morteo - FAO - 5 May 2023WaPOR Portal v2.1 - Karl Morteo - FAO - 5 May 2023
WaPOR Portal v2.1 - Karl Morteo - FAO - 5 May 2023
 
Dsm Presentation
Dsm PresentationDsm Presentation
Dsm Presentation
 
Maximizing GIS Performance In Your Sleep
Maximizing GIS Performance In Your SleepMaximizing GIS Performance In Your Sleep
Maximizing GIS Performance In Your Sleep
 
ArcGIS API for Javascript Tutorial
ArcGIS API for Javascript TutorialArcGIS API for Javascript Tutorial
ArcGIS API for Javascript Tutorial
 
Spatial Data with SQL Server Reporting Services
Spatial Data with SQL Server Reporting ServicesSpatial Data with SQL Server Reporting Services
Spatial Data with SQL Server Reporting Services
 
GIS Presentation.pptx
GIS Presentation.pptxGIS Presentation.pptx
GIS Presentation.pptx
 
Map reduce presentation
Map reduce presentationMap reduce presentation
Map reduce presentation
 
High Accuracy Data Collection with Esri's Collector App
High Accuracy Data Collection with Esri's Collector AppHigh Accuracy Data Collection with Esri's Collector App
High Accuracy Data Collection with Esri's Collector App
 
Mar88CADalyst
Mar88CADalystMar88CADalyst
Mar88CADalyst
 
belajar dasar geospatial sistem informasi geografi
belajar dasar geospatial sistem informasi geografibelajar dasar geospatial sistem informasi geografi
belajar dasar geospatial sistem informasi geografi
 

Kürzlich hochgeladen

Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
AroojKhan71
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
amitlee9823
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
amitlee9823
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
amitlee9823
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
amitlee9823
 

Kürzlich hochgeladen (20)

Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interaction
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptx
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
 
ALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptxALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptx
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 

PostgreSQL GIS

  • 1. The magic of PostgreSQL view tables
  • 2. What is the task?
  • 3.
  • 4.
  • 6.
  • 7.
  • 8. How can we improve?
  • 9. WaND database: Consists of 5 tables and 7 views. The tables store the data related to the site geography, site information, and constants. The views store the calculations performed based on the data in the tables.
  • 10. Tables: 1. indoor_water_demand: constants for demands and percent reduction based on landuse 2. landuse: landuse lookup table 3. scenarios: building and landscape data for parcels; multiple entries per parcel are allowed 4. sites: parcel boundary and site information (contains geography) 5. spatial_ref_sys: default PostGIS table
  • 12. sites table: User create this (first step) as geometry
  • 13. scenarios table snippet: User fills this out as tabular data (no geometry)
  • 14. Views: 1. geography_columns: default PostGIS table 2. geometry_columns: default PostGIS table 3. raster_columns: default PostGIS table 4. raster_overviews: default PostGIS table 5. scenario1_calcs: calcs for water demand and reduction based on landuse, summed by parcel 6. scenario1_iwd: sums GFA by landuse per parcel and joins to indoor_water_demand table 7. scenario2_calcs: calcs for water demand and reduction based on landuse, summed by parcel 8. scenario2_iwd: sums GFA by landuse per parcel and joins to indoor_water_demand table 9. sites_scenario1: joins calcs to geometry for map display 10. sites_scenario2: joins calcs to geometry for map display
  • 15. scenario1_calcs view snippet: All this is run by the database automatically as sites and scenario1 are updated
  • 16. scenario1_calcs view create SQL snippet: Here’s a bit of what the create SQL code looks like. It is summing the calculations by parcel number (more on next slide).
  • 17. scenario1_calcs view create SQL snippet: This shows the nested query (derived table) that calculates the water demand and reductions that are then used in the monthly calcs. This format allows it to be calculated once then reused by the monthly calcs (kind of like a variable).
  • 18. scenario1_iwd view snippet: All this is run by the database automatically as sites and scenario1 are updated.
  • 19. scenario1_iwd view create SQL snippet: This code joins the indoor water demand table to the user input scenario data based on landuse. The GFA are summed for that landuse type within the parcel. These numbers drive the scenario1_calcs view.
  • 21. sites_scenario1 view in QGIS: Colors and data will automatically update as the user inputs additional buildings or landscaping into the scenario1 table. Geometry will automatically update to match sites table.
  • 22. sites_scenario1 view in ArcGIS Pro: First you need to connect to the database.
  • 23. sites_scenario1 view in ArcGIS Pro: After connecting you can see all the tables and views. Tables without geometry can be added to the map for viewing.
  • 24. sites_scenario1 view in ArcGIS Pro: To work with spatial tables/views, you will need to make a query layer.
  • 25. sites_scenario1 view in ArcGIS Pro: Now we have a dynamic connection to our database.
  • 26. sites_scenario1 view in ArcGIS Pro: In order to keep the data refreshed, we’ll need to adjust the caching. This will auto- update the data, but if any fields change, the query will need to be re-run.
  • 27. With linked views in ArcGIS Pro, you can compare multiple scenarios side by side. Shown below is annual business as usual water demand
  • 28. Annual design reclaimed grey wastewater supply…
  • 30.
  • 31.
  • 32.