Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

[FOSS4G 2017 Boston]Development of an extension of Geoserver for handling 3D spatial data

569 views

Published on

Recently, several open-source software tools such as CesiumJS and iTowns have been developed for dealing with 3-dimensional spatial data. These tools mainly focus on visualization of 3D spatial data based on WebGL. An open-sourced server capable of storing, sharing and querying 3D spatial data has not yet been developed. GeoServer, one of the representative open source spatial data servers, provides many powerful features. In particular, it supports connecting to and publishing spatial data from a variety of data sources. GeoServer also supports Web Feature Service(WFS), which is a standard protocol established by the Open Geospatial Consortium to request geospatial feature data. However, GeoServer provides functions only for two- dimensional geometry, so it provides few functions for handling 3D spatial data. Because JTS Topology Suite, which is an important component of GeoServer, does not support 3D spatial operations, it also does not support solid geometries. In this paper, we discuss extension modules of GeoServer that we have implemented to handle 3D spatial data. First, instead of JTS, our modules adopted a geometry model based on the ISO 19107 standard and support 3D spatial operations from the Simple Feature CGAL library. Based on this geometry model, we have implemented new internal data structures that represent spatial information from the Feature interface in GeoServer. Second, we also extended the DataStore module to handle and store 3D spatial information for several data sources such as GeoJSON, GML and PostGIS. Finally, we extended the WFS module to share 3D spatial data via GeoServer.

Published in: Software
  • Be the first to comment

[FOSS4G 2017 Boston]Development of an extension of Geoserver for handling 3D spatial data

  1. 1. Development of an extension of GeoServer for handling 3D spatial data Hyung-Gyu Ryoo (hgryoo@pnu.edu) Soojin Kim (soojin.kim@pnu.edu) Joonseok Kim (joonseok@pnu.edu) Ki-Joune Li (lik@pnu.edu) Pusan National University, South Korea FOSS4G 2017 Boston - August 18, 2017 1
  2. 2. FOSS4G 2017 Boston August 18, 2017 About Us 2 Main Developers AdvisorInitial Design Hyung-Gyu Ryoo (hgryoo@pnu.edu) Soojin Kim (soojin.kim@pnu.edu) Dr. Joonseok Kim (joonseok@pnu.edu) Prof. Ki-Joune Li (lik@pnu.edu)
  3. 3. FOSS4G 2017 Boston August 18, 2017 3
  4. 4. FOSS4G 2017 Boston August 18, 2017 NOTICE This project is not be perfect This project is a new challenge Your insights and feedback 4
  5. 5. FOSS4G 2017 Boston August 18, 2017 Contents ● Why do we need GeoServer 3D? ● GeoServer/GeoTools 3D ● Demonstration ● Next Steps ● Summary 5
  6. 6. FOSS4G 2017 Boston August 18, 2017 Common Open Source 2D GIS Architecture 6 Spatial Databases File Sources Geospatial Server Desktop Client Web Client PostGIS OpenLayers QGIS GeoServer ESRI Shapefile
  7. 7. FOSS4G 2017 Boston August 18, 2017 Why we need Geospatial server? 7 Spatial Databases File Sources Desktop Client Web Client My Super Server My Super Server2 My Super Server3 My Super Server4
  8. 8. FOSS4G 2017 Boston August 18, 2017 Common Open Source 2D GIS Architecture 8 Spatial Databases File Sources Geospatial Server Desktop Client Web Client PostGIS OpenLayers QGIS GeoServer ESRI Shapefile
  9. 9. FOSS4G 2017 Boston August 18, 2017 Open source 3D GIS data visualization tools 9 (cesiumjs.org) (itowns-project.org) NASA World Wind (worldwind.arc.nasa.gov)
  10. 10. FOSS4G 2017 Boston August 18, 2017 SFCGAL Data Stores Supporting 3D 10 (postgis.net) (oracle.com/database/spatial/) (sfcgal.org)
  11. 11. FOSS4G 2017 Boston August 18, 2017 For Open Source 3D GIS Architecture? 11 Spatial Databases File Sources Geospatial Server Desktop Client Web Client
  12. 12. FOSS4G 2017 Boston August 18, 2017 Existing Open Source 3D GIS Stack 12 (3dcitydb.org) ?
  13. 13. FOSS4G 2017 Boston August 18, 2017 Requirements of a general 3D spatial data server 13 1.Data structures to store features with 3D geometries 2.Functions to process queries on 3D objects 3.Connections to data stores able to store 3D spatial information 4.Standard web services for sharing 3D spatial information
  14. 14. FOSS4G 2017 Boston August 18, 2017 For Open Source 3D GIS Architecture? Spatial Databases File Sources Desktop Client Web Client ? GeoServer 3D 14
  15. 15. FOSS4G 2017 Boston August 18, 2017 15 ● Representative open source spatial data servers ● Based on GeoTools ● Provide a variety of spatial data sources by excellent abstraction ● Geospatial web services that provides functions to share and query spatial data (OGC - WMS, WFS and WPS). (geotools.org)(geoserver.org)About GeoServer
  16. 16. FOSS4G 2017 Boston August 18, 2017 Excellent Abstraction 16 FeatureSource DataStore Data Type Query Feature Feature Type Filter Function Expression WFS
  17. 17. FOSS4G 2017 Boston August 18, 2017 GeoServer has limitations in handling 3D! 17 GeoServer can handle and store points, curves and surfaces with z coordinates But! It is impossible to store spatial information with solids Spatial query processing is performed without z coordinates Why?
  18. 18. FOSS4G 2017 Boston August 18, 2017 JTS - limitation for supporting 3D in GeoServer ● JTS geometries can carry a Z coordinate ● What about solid geometries? ● What about 3D spatial operations? 18 OGC::Simple Feature Access based on <Java Class> JTS::Geometry
  19. 19. FOSS4G 2017 Boston August 18, 2017 ISO 19107 spatial schema-based interface 19 <Java Interface> ISO 19107 Spatial Schema <Java Class> ISO 19107 Geometries Implementation gt-geometry ● Implementations of ISO Geometry supported as an unsupported module ● 3D spatial operations are not implemented
  20. 20. FOSS4G 2017 Boston August 18, 2017 We had two options! ● Options ○ Develop or port every function from scratch ○ Reuse or utilize existing open source libraries 20 ● Existing open source library for 3D spatial operations ○ CGAL (GNU LGPL 3+, GNU GPL 3+) ■ C++, A variety of robust computational geometry algorithms in 3D spaces as well as 2D ■ Different from those in GIS domains ○ Simple Feature CGAL (GNU LGPL 2+) by Oslandia ■ C++, Based on CGAL and Boost
  21. 21. FOSS4G 2017 Boston August 18, 2017 <Java> GeoServer ISO Geometry Geometry DirectPosition Point Curve ... Connecting SFCGAL to ISO Geometry module 21 <C++> SFCGAL Geometry Algorithm CGAL Boost SFCGAL Converter JavaCPP SFCGAL Java Wrapper Geometry Algorithm
  22. 22. FOSS4G 2017 Boston August 18, 2017 Example of performing 3D operations using SFCGAL 22 Ex) Intersects between Curve and Solid <ISO 19107> Curve <ISO 19107> Solid <SFCGAL> SFLineString <SFCGAL> SFSolid <SFCGAL> IntersectsOperation true/false
  23. 23. FOSS4G 2017 Boston August 18, 2017 New ISO 19107 Geometry Module ● Easy installation for Ubuntu users ○ sudo ./cppbuild.sh //Boost, CGAL and SFCGAL are installed ○ mvn clean install ● Support 3D operations ○ distance, area, volume, convexHull... ○ intersects, contains, within... ○ intersection, difference, union... 23
  24. 24. FOSS4G 2017 Boston August 18, 2017 Now, Done? Absolutely Not! Long way to go... 24
  25. 25. FOSS4G 2017 Boston August 18, 2017 Next? 25 Examine GeoTools/GeoServer from bottom to top WFS
  26. 26. FOSS4G 2017 Boston August 18, 2017 Codes are coupled with JTS! 26
  27. 27. FOSS4G 2017 Boston August 18, 2017 Simple strategy 1.Use a well-defined interfaces in GeoServer/GeoTools 2.Copy and rewrite classes to support ISO 19107 geometries if the class is connected to a JTS geometries 3.Leave codes that are not coupled with JTS as much as possible 4.For copied codes, perform unit tests 27
  28. 28. FOSS4G 2017 Boston August 18, 2017 A Data Store for 3D Spatial Information 28 ● File data store ○ CSV ○ GeoJSON ○ GML ● Database data store ○ PostGIS ○ Oracle
  29. 29. FOSS4G 2017 Boston August 18, 2017 A Data Store for 3D Spatial Information 29 Apply the 3D filter condition using the SFCGAL operation Candidate features Select features without a 3D filter condition Result features Select features with a 3D filter condition supported by data store Y N Get Features with a 3D spatial filter Can the filter be supported in data store? END
  30. 30. FOSS4G 2017 Boston August 18, 2017 WFS Extension for 3D Queries 30 ● Web Feature Service (WFS) ○ An interface for providing spatial data in vector format ○ WFS 1.1 supports GML 3.1.1 used in HTTP requests from and responses to the client ○ the GML 3.1.1 contains solids element ● Encoding/Decoding of GML Elements contained in 3D filter conditions.
  31. 31. FOSS4G 2017 Boston August 18, 2017 WFS Extension for 3D Queries 31 Data Store WFS Request/Response Data Feature Collection GML ⇔ Features with ISO Geometry Filter GeoServer WFS Client Data store Query region
  32. 32. FOSS4G 2017 Boston August 18, 2017 3D Open Source Software Stack GeoServer 32 DBMS/File GeoTools GeoServer Services/Applications OS Cesium/NASA World Wind/QGIS Ubuntu/CentOS Oracle/PostGIS FeatureStore (Well defined) GML/ShapeFile... I/O Plugins [GeoJSON, ShapeFIle…] DataStores [JDBCDataStore/FileDataStore] Query/Filter (JTS Only) WPS Process (JTS Only) SQLDialect Data Management [Vector, DB] Services [WFS, WCS, WPS, WMS] Web Administration UI Oracle PostGIS SFCGAL Extension New DataStores (uses ISO Geometry) New SQLDialect, I/O Plugin (type mapping to ISO Geometry) New FilterFactory, (uses SFCGAL query evaluation) WPS Process (new proc using ISO geometry) GeoServer 3D Extension XML Binidng (JTS Only) XML Binding (uses ISO geometry) WFS 1.1 Service (uses ISO geometry)
  33. 33. Demonstration 33
  34. 34. FOSS4G 2017 Boston August 18, 2017 Demonstration(1/3) - Overview 34 GeoServer 3D Draw WFS Request PostGIS 3D WFS Client Highlighting WFS Response RegisterStore
  35. 35. FOSS4G 2017 Boston August 18, 2017 Demonstration(2/3) - Test Data 35 ● Test data 1 - Extruded Buildings from OSM data ○ Buildings with height over 3m in Boston ○ 39712 number of buildings ○ Each building is made of solid geometry.
  36. 36. FOSS4G 2017 Boston August 18, 2017 Demonstration(3/3) - Test Data 36 ● Test data 2 - Indoor data with 3D rooms from IndoorGML data ○ Rooms and corridors in a shopping mall in Seoul. ○ 3496 number of rooms ○ Each room is made of solid geometry.
  37. 37. FOSS4G 2017 Boston August 18, 2017 Next Steps ● Documentation! ● Administration GUI for 3D ● Making a switch between JTS and ISO Geometry ● Supporting WFS 2.0 version to support rich set of advanced functions ● Plain WFS => Tiling ● Test and improve again and again to be stable 37
  38. 38. FOSS4G 2017 Boston August 18, 2017 OGC Visualization Model 38 Data Repository Select Display Element Generator Render Display Internet Thin Server (WFS) Thick Client Data Repository Select Display Element Generator Internet Data Repository Select Display Element Generator InternetRender Display Render Display Medium Client Medium Server (W3DS) Thick Server Thin Client
  39. 39. FOSS4G 2017 Boston August 18, 2017 Summary ● GeoServer does not support 3D spatial data handling because it has been implemented based on Simple Feature Access Specification ● We developed new implementation of ISO 19107 geometric model, which can support 3D spatial geometry and computation ● We extended lots of modules to support 3D functionalities based on the geometric model 39
  40. 40. FOSS4G 2017 Boston August 18, 2017 Thank you! 40 hgryoo@pnu.edu | @hgryoo https://github.com/STEMLab/geotools-3d-extension https://github.com/STEMLab/geoserver-3d-extension

×