postgis: future developmentscurrent features opengis “simple features for sql” certified spatial...
TRANSCRIPT
![Page 1: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/1.jpg)
PostGIS: future developments
![Page 2: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/2.jpg)
What is PostGIS
● GPL PostgreSQL extension for Geographic Objects● Types● Operators● Functions● Indexes● Standard interfaces● Extension API
![Page 3: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/3.jpg)
Current features
✔ OpenGIS “Simple Features for SQL” certified✔ Spatial analysis and predicates (GEOS/JTS)✔ Up to 4 dimensions coordinates (Shapefile-like)✔ 2d spatial indexing (rtree/GiST)✔ SRS reprojections (PROJ4)✔ About 200 spatial functions✔ Lossless Shapefile import / export
![Page 4: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/4.jpg)
current features
OGC types
1. Points
2. Lines
3. Polygons
4. MultiPoints
5. MultiLines
6. MultiPolygons
7. Collections
![Page 5: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/5.jpg)
current features
Spatial analysis
✔ Union✔ Intersection✔ Difference✔ Symmetric difference✔ Convex Hull✔ Buffer
![Page 6: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/6.jpg)
current features
Spatial predicates
✔ Equals✔ Disjoint✔ Intersects✔ Touches✔ Crosses✔ Within✔ Contains✔ Overlaps
![Page 7: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/7.jpg)
current features
Coordinate dimensions✔ 2D ( X, Y )✔ 2.5D ( X, Y, Z )✔ Measured ( X, Y, M )✔ Measured 2.5D ( X, Y, Z, M )
LosslessShapefile
import / export
![Page 8: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/8.jpg)
Community
● MapServer● GeoServer● UDIG● Qgis● Jump● OpenEV● GRASS● OGR
● GeoTypes● GeoTools● MezoGIS● Thuban● phpPgGis● PrimaGIS● OrbisCAD● ...
![Page 9: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/9.jpg)
Ongoing and future developments
● Long transactions● Topology● Networks● Rasters● ISO SQL/MM
![Page 10: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/10.jpg)
ongoing development
Long transactions
● Features locking● Implemented in 1.1.3● OGC standard (WFS)
![Page 11: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/11.jpg)
long transactions
What for ?
● OGC Web Features Service● Generic web-based architectures● Data integrity● Concurrent access
![Page 12: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/12.jpg)
long transactions
How does it work
● Lock any database row (not only features)● The lock is bound to an authentication token● Add auth tokens to your session● Do your things● Unlock the row(s)
![Page 13: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/13.jpg)
long transactions
How does it work
● Locks are stored inside the DBMS● Protection is implemented using triggers● No middleware involved● Every application is prevented from altering a
locked row
![Page 14: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/14.jpg)
ongoing development
Topology
● Normalized spatial data● Drafted since 1.1.0● ISO standard
(SQL/MM)
![Page 15: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/15.jpg)
topology
Why ?
● Topological integrity● Reduced storage size● Spatial analysis
![Page 16: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/16.jpg)
why topology ?
Topological integrity
● Every intersection is a node
![Page 17: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/17.jpg)
why topology ?
Topological integrity
● Every intersection is a node
![Page 18: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/18.jpg)
why topology ?
Topological integrity
● Edges are shared ...
![Page 19: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/19.jpg)
why topology ?
Topological integrity
● ... not separate entities.
![Page 20: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/20.jpg)
why topology ?
Reduced storage size
● Every edge is stored only once
![Page 21: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/21.jpg)
why topology ?
Spatial analysis
● Spatial relationships are part of the model● Predicates and overlays using standard SQL● Do they touch ? YES ! (no starvation)
![Page 22: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/22.jpg)
topology
What do we have
● Draft included in PostGIS 1.1.0● Conceptual schema● Physical schema (ISO SQL/MM)● Functions (ISO SQL/MM)
![Page 23: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/23.jpg)
topology
Conceptual model
● Faces, Edges and Nodes
![Page 24: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/24.jpg)
topology
Conceptual model
● Topo-geometries
![Page 25: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/25.jpg)
topology
Conceptual model
● Layers
![Page 26: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/26.jpg)
topologyConceptual model
![Page 27: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/27.jpg)
topology
Physical model
● PostgreSQL 7.3 or up required● All routines, types and other management objects
are stored in the "topology" schema● Topologies are stored in schemas● TopoGeometry type● Layers metadata
![Page 28: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/28.jpg)
topology
Metadata tables
● topology.topology● topology.layer
![Page 29: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/29.jpg)
topology
Topology schema
● <name>.edge● <name>.face● <name>.node● <name>.relation (TopoGeometry comp.)
![Page 30: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/30.jpg)
topology
Functions
● Create/destroy topologies● Edit topologies● Validate topologies● Define layers (simple and hierarchical)● Define TopoGeometries (simple and hierarchical)● Cast TopoGeometries to Geometries
![Page 31: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/31.jpg)
topology
Example: loading a topology
SELECT topology.CreateTopology('mytopo');
![Page 32: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/32.jpg)
topology
Example: loading a topology
INSERT INTO mytopo.face(face_id) VALUES(1); -- F1
![Page 33: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/33.jpg)
topology
Example: loading a topology
INSERT INTO mytopo.node VALUES(1, 'POINT(0 0)', NULL); -- N1
INSERT INTO mytopo.node VALUES(2, 'POINT(0 30)', NULL); -- N2
INSERT INTO mytopo.node VALUES(3, 'POINT(30 30)', NULL); -- N3
![Page 34: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/34.jpg)
topology
Example: loading a topologyINSERT INTO mytopo.edge VALUES(1, 1, 2, -3, 2, 0, 1, 'LINESTRING(0 0, 0 30)'); -- E1
INSERT INTO mytopo.edge VALUES(2, 2, 3, -1, 3, 0, 1, 'LINESTRING(0 30, 30 30)'); -- E2
INSERT INTO mytopo.edge VALUES(3, 3, 1, -2, 1, 0, 1, 'LINESTRING(30 30, 0 0)'); -- E3
![Page 35: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/35.jpg)
topology
Example: validating a topology
SELECT * FROM topology.ValidateTopology ('mytopo');
error | id1 | id2 -------+-----+-----(0 rows)
![Page 36: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/36.jpg)
topology
Example: defining a TopoGeometry
CREATE TABLE land_parcels (feature_name VARCHAR);
-- Returns TG_LAYER_IDSELECT AddTopoGeometryColumn('mytopo', 'public', 'land_parcels', 'feature', 'POLYGON');
INSERT INTO features.land_parcels VALUES ('P1', -- Feature name topology.CreateTopoGeom( 'mytopo', -- Topology name 3, -- Topology geometry type (polygon/multipolygon) 1, -- TG_LAYER_ID for this topology (from topology.layer) '{{1,3}}') -- face_id:1 );
![Page 37: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/37.jpg)
topology
Missing features
● ISO SQL/MM topology editing functions are incomplete (can still use standard SQL)
● TIGER/Line loader dumper (possible at this stage)
● Geometry => TopoGeometry● Interface cleanups
![Page 38: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/38.jpg)
future developments
Network
● Shortest path● Cartoweb● ISO standard
(SQL/MM)
![Page 39: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/39.jpg)
network
Why ?
● Communication networks modeling● Standardized interface● Common algorithms
![Page 40: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/40.jpg)
network
What would it be ?
● A schema and a set of functions● Like Topology model● Nodes, Links (vs. edges), No faces
![Page 41: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/41.jpg)
network
Current status
● Unimplemented :)
![Page 42: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/42.jpg)
future developments
Rasters
● DBMS vs. filesystem● Imagery or analysis ?● Standards ?● Use cases ?
![Page 43: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/43.jpg)
rasters
Why ?
● Unified access● Relational model (metadata)● SQL interface● Transactional integrity● Raster cells analysis
![Page 44: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/44.jpg)
rasters
Why not ?
● File formats already indexed● Easier disaster recovery● Don't use DBMS as filesystems :)● Rasters on disk and metadata in DBMS● I/O overhead (blobs?)
![Page 45: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/45.jpg)
rasters
Possible data models
● Blocks (values are blocks)– existing implementations (ie. GEORASTER)
● Wrapped-blob (values are file handlers)– reduced I/O overhead
– no need to define yet another file format
● Fully relational (values are single pixels)– quick & easy
– scalability & performance limits
![Page 46: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/46.jpg)
rasters
What do we have
● The CHIP type (could become a BLOCK type)● PgCHIP gdal driver● An implementation of the “fully relational”
model● A community pushing for it :)
![Page 47: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/47.jpg)
future developments
ISO SQL/MM
● Signatures● New types● (Topology)● (Networks)
![Page 48: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/48.jpg)
ISO SQL/MM
Types
● Instantiable subtypes● CircularString● CompoundCurve● CurvePolygon● MultiCurve● Surface● MultiSurface
![Page 49: PostGIS: future developmentsCurrent features OpenGIS “Simple Features for SQL” certified Spatial analysis and predicates (GEOS/JTS) Up to 4 dimensions coordinates (Shapefile-like)](https://reader030.vdocument.in/reader030/viewer/2022040803/5e3e8eaad5833217a0334bb8/html5/thumbnails/49.jpg)
That's all, folks !
Questions ?