Presentation Plan Spatial Databases Standards and 3D
PostGIS 2.0 and 3D Implementation 3D GIS Open Source Stack Orbe 3D application use case Open Issues List
Perspectives and Conclusion
Oslandia SME Company
Expertise in OpenSource GIS.
Mainly Focus on:
- Spatial Databases - OGC/ISO Web Services
- Routing, Network and Graphs Solutions - QGIS
- OGC and OsGEO Member
OrbeSME Company
Expertise in interactive 3D applications
Mainly Focused on: - Media, user data & GIS integration with realtime 3D - Enabling users to create & share geolocated data across platforms - PC/Mac, desktop & web, smartphone applications
3D GIS: A meeting point BIM:
Focus on Building model
CAD/CAO world
IFC standard
CIM: Focus on City model
GIS world
CityGML standard
CIM: Focus on City model
GIS world
CityGML standard
First Implementation
First implementation of 3D in PostGIS: 2007 (PoC)(FOSS4G 2007)
A bit too early:- No available and stable client to render 3D on a browser- 3D data were still expensives- Market not mature enough
Spatial database standards: 3D concepts
OGC SFS 1.2.02006
ISO 19125Draft 2011
ISO 191252004
ISO SQL/MM2003
OGC SFS 1.11999
ISO SQL/MM2006
ISO SQL/MMDraft 2009
ISO TC 211
OGC SFS WG
ISO JTC1 SC32 WG4
New Surface types: TriangleOne exterior ring with 3 differents points
(and 1 point more to close the ring)
No interior ring (i.e no hole)
Points must not be colinears
Triangle could be 2D, 3D, 3DM or even 4D
TRIANGLE((0 2, 10 4, 12 0, 0 2))
New Surface types: TINCollection of triangles connected by edges
Every triangle share same orientation
TIN could enclose a solid (or not)
TIN could be 2D, 3D, 3DM or even 4D
TIN(((0 2, 10 4, 12 0, 0 2)), ((0 2, -2 -6, 12 0, 0 2)), ((0 2, 10 4, 5 8, 0 2)))
New Surface types: PolyhedralSurfaceCollection of polygons connected by edges
Every polygon share same orientation
Points of the polygon must be coplanar (enough)
Polygons could have internal rings (i.e holes)
PolyhedralSurface could enclose a solid (or not)
PolyhedralSurface could be 2D, 3D, 3DM or even 4D
POLYHEDRALSURFACE( ((0 2, 10 4, 12 0, 5 8, 0 2)), ((0 2, -2 -6, 12 -6, 12 0, 0 2)))
New Surface types: PolyhedralSurface
POLYHEDRALSURFACE(((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)),((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)),((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)),((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)),((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)),((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)))
s
A 3D PolyhedralSurface example, enclosing a cube
Spatial database standards: 3D specs
OGC SFS 1.2
2006
Draft ISO SQL/MM
2009
Draft ISO 191252011
Triangle No Yes YesTIN Yes Yes YesPolyhedralSurface Yes Yes YesFunctions on TIN and PolyhedralSurface handling
Yes Yes Yes
Functions on 3D Topology and measures (Distance, Intersects...)
No Yes Yes
Vertical Datum No No Yes
3D Functions Availables on TrunkBox2DBox3DGeometryTypeST_AffineST_AreaST_AsBinaryST_AsEWKTST_AsEWKBST_AsGMLST_AsX3D ST_DimensionST_DumpST_DumpPointsST_ExpandST_ExtentST_Extent3DST_FlipCoordinate
ST_Force_2DST_Force_3DST_Force_3DZST_GeomFromEWKTST_GeomFromEWKBST_GeomFromGMLST_GeometryNST_GeometryTypeST_IsClosedST_MemSizeST_NumGeometriesST_NumPatchesST_PatchNST_PerimeterST_Perimeter3DST_RotateST_RotateXST_RotateYST_RotateZST_ScaleST_Shift_LongitudeST_Transform
So what available in PostGIS 2.0, for 3D ?
OGC SFS 1.2 3D Types (TIN, PS)
3D spatial indexes
GML and X3D geometries
Input / Output
That's the really basics, and should initiate new usages (and so we hope fundings)
(Really) BasicSpatial Analysis
What do we want for 3D Architecture ?
Spatial Database
Webclient
Desktop client
Data loader
Web Services
Well, the same than for 2D !
3D GIS Architecture
Collada loader
Spatial Database
WFS -T
W3DS
Web 3Dclient
Desktop 3D client
CityGML loader
3D GIS Architecture: CityGML loader
Collada loader
Spatial Database
WFS -T
W3DS
WebGLclient
Desktop 3D client
CityGML loader
BRGM provide a C++ beta CityGML parser lib (libcitygml)But still no tool to perform a CityGML to PostGIS import.
3D GIS Architecture: Collada Loader
Collada loader
Spatial Database
WFS -T
W3DS
Web 3Dclient
Desktop 3D client
CityGML loader
Collada-dom provide a C++ API on collada docsBut still no tool to import Collada inside PostGIS
3D SIG Architecture
Collada loader
Spatial Database
WFS -T
W3DS
Web 3Dclient
Desktop 3D client
CityGML loader
TinyOWS is already able to output and input GML 3.1.1But not yet CityGML (or broader Application Schema)
3D SIG Open Source Architecture
Collada loader
Spatial Database
WFS -T
W3DS
Web 3Dclient
Desktop 3D client
CityGML loader
AFAIK still no Open Source application for W3DS implementation, other than Proof Of Concept
3D SIG Open Source Architecture
Collada loader
Spatial Database
WFS -T
W3DS
Web 3Dclient
Desktop 3D client
CityGML loader
Alpha of globe support in QGIS multithreaded branchNext step: having something stable and volumes handling
3D SIG Open Source Architecture
Collada loader
Spatial Database
WFS -T
W3DS
Web 3Dclient
Desktop 3D client
CityGML loader
Beta of globe support with OpenWebGlobe (WebGL)Next step: having something stable and volumes support.
Current ORBE X3D implementation Observations: - 3D is cheaper than 2D! As far as maps are concerned (in our own use cases), 3D files are far more light-weighted than their rasterized counterparts - 3D objects can be used at a wider range of zoom levels without quality loss than 2D rasters
Current ORBE X3D implementation Former approach: - use a 2D map to build 3D « by hand », ideal for small areas and without access to GIS data
Current approach: - export GIS data in a (hopefully soon) widely supported 3D file format like X3D
- for that purpose, Orbe created a PostGIS 2.0 function using Jonathan Schewchuk's Triangle for triangulation: ST_AsX3D
Open Issues Lists1) Triangulation 2) TIN Simplification3) CityGML Loader 4) IsValid geometries check5) Vertical Datum6) TIN for DEM Storage7) Texture handling8) 3D Topology functions
Open Issue #1: Triangulation Lot of 3D usages only deal with TIN and not with PolyhedralSurface
So be able to convert PolyhedralSurface to TIN will become a need
Known Implementations: CGAL, TetGen
Open Issue #2: Tin Simplification
Reduce the number of triangles
Preserve the volume
Preserve the global andlocal shapes
Known Implementations: CGAL, GTS
Fast and memory efficient Algorithm: Lindstrom and Turk
Source: CGAL
Open Issue #3: CityGML LoaderGML 3 handles a lots of geometry types that spatial database standard don't. (true solid...)
GML allow composition of several solids into a single feature
Interesting to be able to downsize LOD(e.g: LOD 3 -> LOD 2)
CityGML extension application schema (ADE)
Implies Triangulation and simplification to import TIN into database and 3D ST_Union
Open Issue #4 IsValid CheckIsValid checks are currently done by GEOSGEOS don't care about Z dimension nor 3D types
No Self Intersection
All Faces edges connected
All Faces Well Oriented
Points of face are coplanars
Open Issue #5: Vertical DatumSRID is used to reference a Coordinate Reference System
Proj4 begins to add vertical datum support,But not yet handle alls.
Proj4 begins to add vertical datum support,But not yet handle alls.
Open Issues #6 DEM storage
Terrain DEM model use also often TIN structure
But it's a NONSENSE to store a whole DEM in a single PostGIS TIN feature !
To store efficiently: - Ability to split the whole TIN into smaller pieces
- Store each pieces in a different PostgreSQL row
- Spatial index to access quickly to each piece
Source: NASA
Open Issue #7 Texture
A Texture is composed of:
A 2D geometry (UV)
Associated to an image
Explore the ability to deal with texture handling throught PostGIS Raster ?
Open Issue #8 Topology Operations
(source Zlatanova, Rahman and Shi 2002)
Now Topology operations are done by GEOS
GEOS (and JTS) only handle 2D (OGC SFS 1.1)
3D Topology Operations only appear in latest SQL/MM and ISO 19125 drafts
There's a need for a robust C++ Topology lib able to fully handle ISO 19107 (2D and 3D).
Conclusions
PostGIS 2.0 will be able to deal with 3D geometries primitives and some very basic spatial functions
A full 3D support in PostGIS (textures, TIN, LOD) means lot of work and will require related funding.
3D Topology library is a broader issue than only PostGIS concern, and should be shared by others Open Source apps.
3D Open Source stack could/should arrive in a quite near future, as each piece becoming more stable and used.
Conclusions
PostGIS 2.0 will be able to deal with 3D geometries primitives and some very basic spatial functions
A full 3D support in PostGIS (textures, TIN, LOD) means lot of work and will require related funding.
3D Topology library is a broader issue than only PostGIS concern, and should be shared by others Open Source apps.
3D Open Source stack could/should arrive in a quite near future, as each piece becoming more stable and used.
Conclusions
PostGIS 2.0 will be able to deal with 3D geometries primitives and some very basic spatial functions
A full 3D support in PostGIS (textures, TIN, LOD) means lot of work and will require related funding.
3D Topology library is a broader issue than only PostGIS concern, and should be shared by others Open Source apps.
3D Open Source stack could/should arrive in a quite near future, as each piece becoming more stable and used.
Conclusions
PostGIS 2.0 will be able to deal with 3D geometries primitives and some very basic spatial functions
A full 3D support in PostGIS (textures, TIN, LOD) means lot of work and will require related funding.
3D Topology library is a broader issue than only PostGIS concern, and should be shared by others Open Source apps.
3D Open Source stack could/should arrive in a quite near future, as each piece becoming more stable and used.
Conclusions
PostGIS 2.0 will be able to deal with 3D geometries primitives and some very basic spatial functions
A full 3D support in PostGIS (textures, TIN, LOD) means lot of work and will require related funding.
3D Topology library is a broader issue than only PostGIS concern, and should be shared by others Open Source apps.
3D Open Source stack could/should arrive in a quite near future, as each piece becoming more stable and used.