0
Mapping, GIS and Geolocating data in Java Using open source software Joachim Van der Auwera  /  Geosparc nv
<ul>AGENDA </ul><ul><ul><li>GIS basics
Data and data formats
Database options
Java libraries
Java servers and frameworks </li></ul></ul><ul></ul>
<ul>GIS basics </ul><ul><ul><li>Maps, layers, tiles and features </li></ul></ul><ul><ul><li>Geometries
Spatial operations and queries
Projections and Coordinate Reference Systems </li></ul></ul><ul><ul><li>Location? </li></ul></ul><ul></ul>
<ul>Layers </ul><ul><ul><li>Handling complexity
Data is split
Overlays
Transparency </li></ul></ul><ul></ul>
<ul>Tiles </ul><ul><ul><li>Handling size
Data is split
Stitched together at joins
Fixed size
WMTS
Eases cacheability </li></ul></ul><ul></ul>
<ul>Features </ul><ul><ul><li>Represents a real-world phenomenon
Has geometry, linking to location on earth
Has attributes, e.g. “maximum depth” for a lake </li></ul></ul><ul></ul>
<ul>Geometry </ul><ul><ul><li>Point, multi-
Linestring, multi-
Linear ring, multi-
Polygon, multi- </li></ul></ul><ul><ul><li>Usually only one type per layer </li></ul></ul><ul><ul><li>Constraints on allow...
<ul>Spatial queries </ul><ul><ul><li>Distance, buffers, joins, intersections
CQL, ECQL </li></ul></ul><ul></ul>
<ul>Coordinate Reference Systems </ul><ul><ul><li>Coordinate notation
Spherical or ellipsoid approximation </li><ul><li>Which ellipsoid </li></ul><li>Origin: (Meridian, Greenwich)?
Unit: degrees, meters,...
Influence of time
WGS84 : global, used by GPS </li><ul><li>(lat,lon) or (lon,lat) </li></ul><li>Many local variants </li></ul></ul><ul></ul>
<ul>Projections </ul><ul><ul><li>The world is not flat
But a screen/paper is
Approximate using a sphere
Approximate using an ellipsoid
Some options </li><ul><li>Cylindrical
Start from a point (azimuthal)
Conical </li></ul></ul></ul><ul></ul>
<ul>Projections, always a compromise </ul><ul><ul><li>Conformal
Equal-area
Equidistant
e.g </li><ul><li>Mercator
Winkel Tripel
Lambert cyl
Equirectangular
Sinusoidal
Molleweide </li></ul></ul></ul><ul></ul>
<ul>Waterman to the rescue? </ul><ul></ul>
<ul>Coordinate Reference Systems </ul><ul><ul><li>EPSG database </li></ul></ul><ul><ul><ul><li>http://www.epsg-registry.or...
Google Mercator (originally 900913, then 3785, now gone?) </li></ul></ul></ul><ul><ul><li>Duplicates </li><ul><li>EPSG:432...
WG:84 </li></ul></ul></ul><ul></ul>
<ul>CRS, SRS, SRID </ul><ul><ul><li>Coordinate Reference System (CRS)
often expressed as Well Known Text (WKT)
SRS, Spatial Reference Code </li><ul><li>EPSG:54019 </li></ul><li>SRID, Spatial Reference ID </li><ul><li>54019
Depends on authority!
Usually EPSG </li></ul></ul></ul><ul></ul>
<ul>Projecting raster images? </ul><ul><ul><li>Aereal images need corrections
Image affected by </li><ul><li>Height of camera
Projection + location (e.g. Mercator!)
Upcoming SlideShare
Loading in...5
×

Mapping, GIS and geolocating data in Java @ JAX London

1,706

Published on

Introduction to mapping, GIS and geolocation in Java. Focusing on open source Java projects which can help you.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,706
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
43
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Mapping, GIS and geolocating data in Java @ JAX London"

  1. 1. Mapping, GIS and Geolocating data in Java Using open source software Joachim Van der Auwera / Geosparc nv
  2. 2. <ul>AGENDA </ul><ul><ul><li>GIS basics
  3. 3. Data and data formats
  4. 4. Database options
  5. 5. Java libraries
  6. 6. Java servers and frameworks </li></ul></ul><ul></ul>
  7. 7. <ul>GIS basics </ul><ul><ul><li>Maps, layers, tiles and features </li></ul></ul><ul><ul><li>Geometries
  8. 8. Spatial operations and queries
  9. 9. Projections and Coordinate Reference Systems </li></ul></ul><ul><ul><li>Location? </li></ul></ul><ul></ul>
  10. 10. <ul>Layers </ul><ul><ul><li>Handling complexity
  11. 11. Data is split
  12. 12. Overlays
  13. 13. Transparency </li></ul></ul><ul></ul>
  14. 14. <ul>Tiles </ul><ul><ul><li>Handling size
  15. 15. Data is split
  16. 16. Stitched together at joins
  17. 17. Fixed size
  18. 18. WMTS
  19. 19. Eases cacheability </li></ul></ul><ul></ul>
  20. 20. <ul>Features </ul><ul><ul><li>Represents a real-world phenomenon
  21. 21. Has geometry, linking to location on earth
  22. 22. Has attributes, e.g. “maximum depth” for a lake </li></ul></ul><ul></ul>
  23. 23. <ul>Geometry </ul><ul><ul><li>Point, multi-
  24. 24. Linestring, multi-
  25. 25. Linear ring, multi-
  26. 26. Polygon, multi- </li></ul></ul><ul><ul><li>Usually only one type per layer </li></ul></ul><ul><ul><li>Constraints on allowed shapes </li></ul></ul><ul></ul>
  27. 27. <ul>Spatial queries </ul><ul><ul><li>Distance, buffers, joins, intersections
  28. 28. CQL, ECQL </li></ul></ul><ul></ul>
  29. 29. <ul>Coordinate Reference Systems </ul><ul><ul><li>Coordinate notation
  30. 30. Spherical or ellipsoid approximation </li><ul><li>Which ellipsoid </li></ul><li>Origin: (Meridian, Greenwich)?
  31. 31. Unit: degrees, meters,...
  32. 32. Influence of time
  33. 33. WGS84 : global, used by GPS </li><ul><li>(lat,lon) or (lon,lat) </li></ul><li>Many local variants </li></ul></ul><ul></ul>
  34. 34. <ul>Projections </ul><ul><ul><li>The world is not flat
  35. 35. But a screen/paper is
  36. 36. Approximate using a sphere
  37. 37. Approximate using an ellipsoid
  38. 38. Some options </li><ul><li>Cylindrical
  39. 39. Start from a point (azimuthal)
  40. 40. Conical </li></ul></ul></ul><ul></ul>
  41. 41. <ul>Projections, always a compromise </ul><ul><ul><li>Conformal
  42. 42. Equal-area
  43. 43. Equidistant
  44. 44. e.g </li><ul><li>Mercator
  45. 45. Winkel Tripel
  46. 46. Lambert cyl
  47. 47. Equirectangular
  48. 48. Sinusoidal
  49. 49. Molleweide </li></ul></ul></ul><ul></ul>
  50. 50. <ul>Waterman to the rescue? </ul><ul></ul>
  51. 51. <ul>Coordinate Reference Systems </ul><ul><ul><li>EPSG database </li></ul></ul><ul><ul><ul><li>http://www.epsg-registry.org/ </li></ul></ul></ul><ul><ul><ul><li>EPSG:4326 is WGS84 </li></ul></ul></ul><ul><ul><ul><li>EPSG:3857 is Mercator
  52. 52. Google Mercator (originally 900913, then 3785, now gone?) </li></ul></ul></ul><ul><ul><li>Duplicates </li><ul><li>EPSG:4326 (lat-lon or lon-lat) </li></ul></ul></ul><ul><ul><ul><li>urn:x-ogc:def:crs:EPSG:6.11.2:4326
  53. 53. WG:84 </li></ul></ul></ul><ul></ul>
  54. 54. <ul>CRS, SRS, SRID </ul><ul><ul><li>Coordinate Reference System (CRS)
  55. 55. often expressed as Well Known Text (WKT)
  56. 56. SRS, Spatial Reference Code </li><ul><li>EPSG:54019 </li></ul><li>SRID, Spatial Reference ID </li><ul><li>54019
  57. 57. Depends on authority!
  58. 58. Usually EPSG </li></ul></ul></ul><ul></ul>
  59. 59. <ul>Projecting raster images? </ul><ul><ul><li>Aereal images need corrections
  60. 60. Image affected by </li><ul><li>Height of camera
  61. 61. Projection + location (e.g. Mercator!)
  62. 62. Angle of photo + height of surface </li></ul></ul></ul><ul></ul>
  63. 63. <ul>Precision </ul><ul><ul><li>Precision allows aligning coordinates on a grid </li><ul><li>Can skew results on spatial operations </li></ul></ul></ul><ul></ul>
  64. 64. <ul>CRS transformations </ul><ul><ul><li>Transformations can be inaccurate as lines turn into curves </li></ul></ul><ul></ul>
  65. 65. <ul>Location </ul><ul><ul><li>Where am I? </li></ul></ul><ul><ul><ul><li>In browser, HTML5, based on IP, GPS, GSM signal </li></ul></ul></ul><ul><ul><li>Where is …? </li><ul><li>Mostly through geocoder web-services </li><ul><li>Geonames (http://www.geonames.org/) </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Nominatim (http://nominatim.openstreetmap.org/) </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Google API, Mappy, Yahoo! PlaceFinder </li></ul></ul></ul></ul><ul></ul>
  66. 66. <ul>Data and data formats </ul><ul><ul><li>OGC Standards: WMS, WFS, WMST
  67. 67. Raster formats: GeoTiff, JPEG2000, ...
  68. 68. Vector formats: GeoJSON, KML, shape, ...
  69. 69. Free data: OpenStreetMap, Natural Earth, local data </li></ul></ul><ul></ul>
  70. 70. <ul>Open Geospatial Consortium </ul><ul><ul><li>Home to most of the GIS related standards </li></ul></ul><ul><ul><li>http://www.opengeospatial.org/
  71. 71. WMS, Web Map Service
  72. 72. WFS, Web Feature Service
  73. 73. WMTS, Web Map Tile Service
  74. 74. WKT, Well Known Text
  75. 75. GML, Geographic Markup Language
  76. 76. KML, Keyhole Markup Language (Google)
  77. 77. SLD, Styled Layer Description
  78. 78. WPS, Web Processing Service
  79. 79. WCS, Web Coverage Service
  80. 80. ... </li></ul></ul><ul></ul>
  81. 81. <ul>Other raster formats </ul><ul><ul><li>GeoTIFF
  82. 82. JPEG2000
  83. 83. MrSID </li></ul></ul><ul><ul><li>Erdas Imagine
  84. 84. SDTS
  85. 85. ECW
  86. 86. DTED
  87. 87. NITF
  88. 88. NASA ELAS
  89. 89. GRASS rasters
  90. 90. ESRI grid
  91. 91. NetCDF
  92. 92. ... </li></ul></ul><ul></ul>
  93. 93. <ul>Other vector formats </ul><ul><ul><li>Shape file (ESRI), very common
  94. 94. GeoJSON
  95. 95. TIGER
  96. 96. DXF (AutoCad)
  97. 97. SDF (Autodesk, MapGuide) </li></ul></ul><ul></ul>
  98. 98. <ul>Open / free data </ul><ul><ul><li>OpenStreetMap, community built map </li></ul></ul><ul><ul><ul><li>http://www.openstreetmap.org/ </li></ul></ul></ul><ul><ul><li>Natural Earth </li></ul></ul><ul><ul><ul><li>http://www.naturalearthdata.com/ </li></ul></ul></ul><ul><ul><li>Local data </li></ul></ul><ul></ul>
  99. 99. <ul>Database options </ul><ul><ul><li>Why a spatial database? </li><ul><li>Spatial operations
  100. 100. OGC “Simple Features for SQL” support </li></ul></ul></ul><ul><ul><ul><ul><li>… WHERE ST_Intersection(roads.geom, city.geom) </li></ul></ul></ul></ul><ul><ul><ul><li>Spatial indexes </li></ul><li>Relational </li><ul><li>PostGis
  101. 101. GeoDB / H2 </li></ul><li>NoSQL </li><ul><li>Neo4j
  102. 102. GeoCouch / CouchDB </li></ul></ul></ul><ul></ul>
  103. 103. <ul>PostGIS </ul><ul><ul><li>Spatial PostgreSQL
  104. 104. PostgreSQL 8.3+ </li></ul></ul><ul><ul><li>(non-Java)
  105. 105. High Performance
  106. 106. Data Integrity
  107. 107. Complete support </li><ul><li>All spatial operations
  108. 108. Coordinate transformations
  109. 109. n-dimensional </li></ul></ul></ul>project PostGis version 1.5.3 site http://postgis.refractions.net/ license GPL (JDBC driver is BSD) <ul></ul>
  110. 110. <ul>GeoDB </ul><ul><ul><li>Spatial H2
  111. 111. In-memory DB </li><ul><li>ideal for junit testing </li></ul><li>Does not support all methods, but can easily be extended </li></ul></ul>project GeoDB version 0.4 site https://github.com/jdeolive/geodb/wiki license BSD-like <ul></ul>
  112. 112. <ul>Neo4j </ul><ul><ul><li>NoSQL, graph database </li></ul></ul><ul><ul><li>geographic features stored as graphs
  113. 113. Great OpenStreetMap support (import etc)
  114. 114. Not all spatial operations (e.g. buffer) </li></ul></ul>project Neo4j spatial version 0.6 site wiki.neo4j.org/content/Neo4j_Spatial license AGPL <ul></ul>
  115. 115. <ul>Java Libraries </ul><ul><ul><li>JTS
  116. 116. GeoTools
  117. 117. Hibernate Spatial
  118. 118. GeoToolkit
  119. 119. Proj4j
  120. 120. GeoLatte
  121. 121. OpenLayers ?
  122. 122. Google, Bing!, Yahoo! Maps ? </li></ul></ul><ul></ul>
  123. 123. <ul>JTS </ul><ul><ul><li>JTS Topology Suite
  124. 124. Geometric model
  125. 125. Geometric operations
  126. 126. Spatial structures and algorithms
  127. 127. I/O capabilities </li><ul><li>WKT, WKB, GML </li></ul></ul></ul>project JTS version 1.12 site http://tsusiatsoftware.net/jts/main.html license LGPL <ul></ul>
  128. 128. <ul>GeoTools </ul><ul><ul><li>GIS tools covering a wide
  129. 129. range of topics </li></ul></ul>project GeoTools version 2.7.3 site http://www.geotools.org/ license LGPL <ul></ul>
  130. 130. <ul><ul><li>Many modules </li><ul><li>Referencing (CRS, transformations,...)
  131. 131. Filtering (CQL, ECQL)
  132. 132. Rendering
  133. 133. Coverage (raster images in many formats)
  134. 134. Data access (DB, WFS, raster, shape,...) </li></ul><li>Extensions </li><ul><li>Schema
  135. 135. Graph
  136. 136. WMS client
  137. 137. Validation </li></ul></ul></ul>project GeoTools <ul></ul>
  138. 138. <ul>Hibernate Spatial </ul><ul><ul><li>Spatial extension for
  139. 139. Hibernate
  140. 140. Register your data provider </li></ul></ul><ul><ul><ul><li>hibernate.dialect=org.hibernatespatial.postgis.PostgisDialect </li></ul></ul></ul><ul><ul><li>Special type for storing a Geometry </li></ul></ul><ul><ul><ul><li>@Column(name = &quot;geom&quot;)
  141. 141. @Type(type = &quot;org.hibernatespatial.GeometryUserType&quot;)
  142. 142. private Geometry geometry; </li></ul></ul></ul><ul><ul><li>Spatial queries, also using Criteria
  143. 143. DB support: PostGis, Oracle10i, MySQL, MSSQL, GeoDB (H2) </li></ul></ul>project Hibernate Spatial version 1.1 site http://www.hibernatespatial.org/ license LGPL <ul></ul>
  144. 144. <ul><li>GeoToolkit </li></ul><ul><ul><li>GIS tools covering a wide range of topics </li></ul></ul><ul><ul><li>Module based </li><ul><li>Referencing
  145. 145. Coverage
  146. 146. Display (swing)
  147. 147. Analytics </li></ul><li>Originally a fork of (part of) GeoTools but with cleanup and refactoring, and Java6 only </li></ul></ul>project GeoToolkit version 3.19 site http://www.geotoolkit.org/ license LGPL <ul></ul>
  148. 148. <ul>Proj4J </ul><ul><ul><li>Java version of Proj4
  149. 149. CRS handling
  150. 150. transformations </li></ul></ul>project Proj4J version 0.1 (-snapshot) site http://trac.osgeo.org/proj4j/ license MIT? <ul></ul>
  151. 151. <ul>GeoLatte </ul><ul><ul><li>Reusable GIS
  152. 152. components
  153. 153. Modules </li><ul><li>Base: transformations, filtering, GeoJSON
  154. 154. Featureserver: access data through Hibernate spatial
  155. 155. Graph
  156. 156. Mapserver
  157. 157. Maprenderer </li></ul></ul></ul>project GeoLatte version ? site http://www.geolatte.org/ license LGPL <ul></ul>
  158. 158. <ul>Notable non-Java projects </ul><ul><ul><li>OpenLayers </li><ul><li>JavaScript
  159. 159. Powerful
  160. 160. Popular </li></ul><li>Not open source </li><ul><li>Google maps / Bing / Yahoo! maps </li><ul><li>Free/open?
  161. 161. Data +/- </li></ul></ul></ul></ul><ul></ul>
  162. 162. <ul>Java servers and frameworks </ul><ul><ul><li>GeoServer
  163. 163. Deegree
  164. 164. uDig
  165. 165. gvSig
  166. 166. Puzzle-GIS
  167. 167. OpenJUMP
  168. 168. GeoKettle
  169. 169. GeoNetwork
  170. 170. SEXTANTE
  171. 171. Geomajas </li></ul></ul><ul></ul>
  172. 172. <ul>GeoServer </ul><ul><ul><li>Share and edit geospatial data
  173. 173. Render data to WMS
  174. 174. WFS interface to your data
  175. 175. Integrated OpenLayers as default viewing engine
  176. 176. Built on GeoTools
  177. 177. Integrate with ArcGIS, Google Maps/Earth; Yahoo! Maps, MS Virtual Earth </li></ul></ul>project GeoServer version 2.1.2 site http://geoserver.org/ license GPL <ul></ul>
  178. 178. project GeoServer <ul></ul>
  179. 179. <ul>deegree </ul><ul><ul><li>supplies building blocks for Spatial Data Infrastructure
  180. 180. Implements OGC and ISO/TC 211 standards
  181. 181. Building blocks </li><ul><li>Web services (WMS, WFS, WPS, WCS, Gazetteer,...)
  182. 182. iGeoPortal
  183. 183. iGeoSecurity
  184. 184. iGeo3D
  185. 185. iGeoDesktop </li></ul></ul></ul>project deegree version 3.0.4 Celcius site http://www.deegree.org/ license LGPL <ul></ul>
  186. 186. project deegree <ul></ul>
  187. 187. <ul>uDig </ul><ul><ul><li>Desktop GIS
  188. 188. Based on Eclipse RCP, JTS, GeoTools
  189. 189. View, edit and print GIS data
  190. 190. Can be extended/customized using plug-ins </li><ul><li>Jgrass, Eurobios, DEWS </li></ul></ul></ul>project uDig version 1.2.2 site http://udig.refractions.net/ license LGPL <ul></ul>
  191. 191. project uDIG <ul></ul>
  192. 192. <ul>gvSig </ul><ul><ul><li>Desktop GIS
  193. 193. Same view local and remote
  194. 194. (through OGC standards)
  195. 195. Extensible
  196. 196. GvSig Mobile
  197. 197. Remote sensing
  198. 198. 3D support </li></ul></ul>project gvSig version 1.11 site http://www.gvsig.org/ license GPL <ul></ul>
  199. 199. project gvSIG <ul></ul>
  200. 200. <ul>Puzzle-GIS </ul><ul><ul><li>Desktop GIS
  201. 201. Based on NetBeans platform
  202. 202. and GeoToolkit
  203. 203. Multi-screen, multi-project at same time
  204. 204. Clear separation source/map/view </li></ul></ul>project Puzzle-GIS version .07 site http://puzzle-gis.codehaus.org/ license LGPL <ul></ul>
  205. 205. project Puzzle-GIS <ul></ul>
  206. 206. <ul>OpenJUMP </ul><ul><ul><li>Desktop GIS
  207. 207. Save, edit-analyze GIS data
  208. 208. Flexible plug-ins </li></ul></ul>project OpenJUMP version 1.4.2 site http://www.openjump.org/ license GPL <ul></ul>
  209. 209. project OpenJUMP <ul></ul>
  210. 210. <ul>GeoKettle </ul><ul><ul><li>Spatial extension of Kettle
  211. 211. (Pentaho Data Integration)
  212. 212. ETL tool, build spatial
  213. 213. data warehouse
  214. 214. Builds on GeoMondrian, spatial extension of Mondrian
  215. 215. Extract also from spatial data sources
  216. 216. Transform also spatial operations (project, geocode,...) </li></ul></ul>project GeoKettle version 2.0 site www.spatialytics.org/projects/geokettle/ license LGPL <ul></ul>
  217. 217. project GeoKettle <ul></ul>
  218. 218. <ul>GeoNetwork </ul><ul><ul><li>Catalog application to manage spatial resources
  219. 219. Metadata editing
  220. 220. Search functions
  221. 221. Embeds GeoServer (optional) </li></ul></ul>project GeoNetwork version 2.6.4 site http://geonetwork-opensource.org/ license GPL <ul></ul>
  222. 222. project GeoNetwork <ul></ul>
  223. 223. <ul>SEXTANTE </ul><ul><ul><li>Spatial data analysis library
  224. 224. +300 geo-algorithms for
  225. 225. raster and vector data processing
  226. 226. Graphical components to run and use those algorithms </li><ul><li>Including graphical modeler </li></ul><li>Integrates with many GIS tools </li><ul><li>gvSig, OpenJUMP, uDIG </li></ul><li>Split of from gvSig </li></ul></ul>project SEXTANTE version 0.6 site http://sextante.forge.osor.eu/ license MIT <ul></ul>
  227. 227. project SEXTANTE <ul></ul>
  228. 228. project SEXTANTE <ul></ul>
  229. 229. <ul>Geomajas </ul><ul><ul><li>Integrate, transform and secure GIS data
  230. 230. (web) application framework / Spatial Application Server
  231. 231. Built on GeoTools, JTS, Spring, GWT, Hibernate Spatial
  232. 232. Faces for front-end/clients </li><ul><li>GWT, SmartGWT, GeoJSON </li></ul><li>Generic layers for data access </li><ul><li>WMS, WFS, GeoTools data source, Hibernate Spatial </li></ul><li>Plug-ins for extension </li><ul><li>Caching and rasterization, printing/PDF, security services, geocoder </li></ul></ul></ul>project Geomajas version 1.9.0 site http://www.geomajas.org/ license AGPL <ul></ul>
  233. 233. project Geomajas <ul></ul>
  234. 234. <ul><ul><li>Thin client
  235. 235. Server for heavy-lifting </li><ul><li>Allows security
  236. 236. Data transformation
  237. 237. Integration with back-end processes </li></ul></ul></ul>project Geomajas <ul></ul>
  238. 238. project Geomajas <ul></ul>
  239. 239. Q & A <ul><li>Joachim Van der Auwera http://blog.progs.be/ Geosparc [email_address] @joachimvda http://geosparc.com/ </li></ul>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×