View
4.824
Download
1
Category
Preview:
Citation preview
PowerPoint-Prsentation
Mapping, GIS and Geolocating data in Java
Using open source software
Joachim Van der Auwera / Geosparc nv
AGENDA
GIS basics
Data and data formats
Database options
Java libraries
Java servers and frameworks
GIS basics
Maps, layers, tiles and features
Geometries
Spatial operations and queries
Projections and Coordinate Reference Systems
Location?
Layers
Handling complexity
Data is split
Overlays
Transparency
Tiles
Handling size
Data is split
Stitched together at joins
Fixed size
WMTS
Eases cacheability
Features
Represents a real-world phenomenon
Has geometry, linking to location on earth
Has attributes, e.g. maximum depth for a lake
Geometry
Point, multi-
Linestring, multi-
Linear ring, multi-
Polygon, multi-
Usually only one type per layer
Constraints on allowed shapes
Spatial queries
Distance, buffers, joins, intersections
CQL, ECQL
Coordinate Reference Systems
Coordinate notation
Spherical or ellipsoid approximationWhich ellipsoid
Origin: (Meridian, Greenwich)?
Unit: degrees, meters,...
Influence of time
WGS84 : global, used by GPS(lat,lon) or (lon,lat)
Many local variants
Projections
The world is not flat
But a screen/paper is
Approximate using a sphere
Approximate using an ellipsoid
Some optionsCylindrical
Start from a point (azimuthal)
Conical
Projections, always a compromise
Conformal
Equal-area
Equidistant
e.gMercator
Winkel Tripel
Lambert cyl
Equirectangular
Sinusoidal
Molleweide
Waterman to the rescue?
Coordinate Reference Systems
EPSG database
http://www.epsg-registry.org/
EPSG:4326 is WGS84
EPSG:3857 is Mercator
Google Mercator (originally 900913, then 3785, now gone?)
DuplicatesEPSG:4326 (lat-lon or lon-lat)
urn:x-ogc:def:crs:EPSG:6.11.2:4326
WG:84
CRS, SRS, SRID
Coordinate Reference System (CRS)often expressed as Well Known Text (WKT)
SRS, Spatial Reference CodeEPSG:54019
SRID, Spatial Reference ID54019
Depends on authority!
Usually EPSG
Projecting raster images?
Aereal images need corrections
Image affected byHeight of camera
Projection + location (e.g. Mercator!)
Angle of photo + height of surface
Precision
Precision allows aligning coordinates on a gridCan skew results on spatial operations
CRS transformations
Transformations can be inaccurate as lines turn into curves
Location
Where am I?
In browser, HTML5, based on IP, GPS, GSM signal
Where is ?Mostly through geocoder web-servicesGeonames (http://www.geonames.org/)
Nominatim (http://nominatim.openstreetmap.org/)
Google API, Mappy, Yahoo! PlaceFinder
Data and data formats
OGC Standards: WMS, WFS, WMST
Raster formats: GeoTiff, JPEG2000, ...
Vector formats: GeoJSON, KML, shape, ...
Free data: OpenStreetMap, Natural Earth, local data
Open Geospatial Consortium
Home to most of the GIS related standards
http://www.opengeospatial.org/
WMS, Web Map Service
WFS, Web Feature Service
WMTS, Web Map Tile Service
WKT, Well Known Text
GML, Geographic Markup Language
KML, Keyhole Markup Language (Google)
SLD, Styled Layer Description
WPS, Web Processing Service
WCS, Web Coverage Service
...
Other raster formats
GeoTIFF
JPEG2000
MrSID
Erdas Imagine
SDTS
ECW
DTED
NITF
NASA ELAS
GRASS rasters
ESRI grid
NetCDF
...
Other vector formats
Shape file (ESRI), very common
GeoJSON
TIGER
DXF (AutoCad)
SDF (Autodesk, MapGuide)
Open / free data
OpenStreetMap, community built map
http://www.openstreetmap.org/
Natural Earth
http://www.naturalearthdata.com/
Local data
Database options
Why a spatial database?Spatial operations
OGC Simple Features for SQL support
WHERE ST_Intersection(roads.geom, city.geom)
Spatial indexes
RelationalPostGis
GeoDB / H2
NoSQLNeo4j
GeoCouch / CouchDB
PostGIS
Spatial PostgreSQL
PostgreSQL 8.3+
(non-Java)
High Performance
Data Integrity
Complete supportAll spatial operations
Coordinate transformations
n-dimensional
projectPostGis
version1.5.3
sitehttp://postgis.refractions.net/
licenseGPL (JDBC driver is BSD)
GeoDB
Spatial H2
In-memory DBideal for junit testing
Does not support all methods, but can easily be extended
projectGeoDB
version0.4
sitehttps://github.com/jdeolive/geodb/wiki
licenseBSD-like
Neo4j
NoSQL, graph database
geographic features stored as graphs
Great OpenStreetMap support (import etc)
Not all spatial operations (e.g. buffer)
projectNeo4j spatial
version0.6
sitewiki.neo4j.org/content/Neo4j_Spatial
licenseAGPL
Java Libraries
JTS
GeoTools
Hibernate Spatial
GeoToolkit
Proj4j
GeoLatte
OpenLayers ?
Google, Bing!, Yahoo! Maps ?
JTS
JTS Topology Suite
Geometric model
Geometric operations
Spatial structures and algorithms
I/O capabilitiesWKT, WKB, GML
projectJTS
version1.12
sitehttp://tsusiatsoftware.net/jts/main.html
licenseLGPL
GeoTools
GIS tools covering a widerange of topics
projectGeoTools
version2.7.3
sitehttp://www.geotools.org/
licenseLGPL
Many modulesReferencing (CRS, transformations,...)
Filtering (CQL, ECQL)
Rendering
Coverage (raster images in many formats)
Data access (DB, WFS, raster, shape,...)
ExtensionsSchema
Graph
WMS client
Validation
projectGeoTools
Hibernate
Spatial
Spatial extension forHibernate
Register your data provider
hibernate.dialect=org.hibernatespatial.postgis.PostgisDialect
Special type for storing a Geometry
@Column(name = "geom")@Type(type = "org.hibernatespatial.GeometryUserType")private Geometry geometry;
Spatial queries, also using Criteria
DB support: PostGis, Oracle10i, MySQL, MSSQL, GeoDB (H2)
projectHibernate Spatial
version1.1
sitehttp://www.hibernatespatial.org/
licenseLGPL
GeoToolkit
GIS tools covering a
wide range of topics
Module basedReferencing
Coverage
Display (swing)
Analytics
Originally a fork of (part of) GeoTools but with cleanup and refactoring, and Java6 only
projectGeoToolkit
version3.19
sitehttp://www.geotoolkit.org/
licenseLGPL
Proj4J
Java version of Proj4
CRS handling
transformations
projectProj4J
version0.1 (-snapshot)
sitehttp://trac.osgeo.org/proj4j/
licenseMIT?
GeoLatte
Reusable GIS components
ModulesBase: transformations, filtering, GeoJSON
Featureserver: access data through Hibernate spatial
Graph
Mapserver
Maprenderer
projectGeoLatte
version?
sitehttp://www.geolatte.org/
licenseLGPL
Notable non-Java projects
OpenLayersJavaScript
Powerful
Popular
Not open sourceGoogle maps / Bing / Yahoo! mapsFree/open?
Data +/-
Java servers and frameworks
GeoServer
Deegree
uDig
gvSig
Puzzle-GIS
OpenJUMP
GeoKettle
GeoNetwork
SEXTANTE
Geomajas
GeoServer
Share and edit
geospatial data
Render data to WMS
WFS interface to your data
Integrated OpenLayers as default viewing engine
Built on GeoTools
Integrate with ArcGIS, Google Maps/Earth; Yahoo! Maps, MS Virtual Earth
projectGeoServer
version2.1.2
sitehttp://geoserver.org/
licenseGPL
projectGeoServer
deegree
supplies building
blocks for
Spatial Data Infrastructure
Implements OGC and ISO/TC 211 standards
Building blocksWeb services (WMS, WFS, WPS, WCS, Gazetteer,...)
iGeoPortal
iGeoSecurity
iGeo3D
iGeoDesktop
projectdeegree
version3.0.4 Celcius
sitehttp://www.deegree.org/
licenseLGPL
projectdeegree
uDig
Desktop GIS
Based on Eclipse RCP, JTS,
GeoTools
View, edit and print GIS data
Can be extended/customized using plug-insJgrass, Eurobios, DEWS
projectuDig
version1.2.2
sitehttp://udig.refractions.net/
licenseLGPL
projectuDIG
gvSig
Desktop GIS
Same view local and remote(through OGC standards)
Extensible
GvSig Mobile
Remote sensing
3D support
projectgvSig
version1.11
sitehttp://www.gvsig.org/
licenseGPL
projectgvSIG
Puzzle-GIS
Desktop GIS
Based on NetBeans platformand GeoToolkit
Multi-screen, multi-project at same time
Clear separation source/map/view
projectPuzzle-GIS
version.07
sitehttp://puzzle-gis.codehaus.org/
licenseLGPL
projectPuzzle-GIS
OpenJUMP
Desktop GIS
Save, edit-analyze GIS data
Flexible plug-ins
projectOpenJUMP
version1.4.2
sitehttp://www.openjump.org/
licenseGPL
projectOpenJUMP
GeoKettle
Spatial extension of Kettle(Pentaho Data Integration)
ETL tool, build spatialdata warehouse
Builds on GeoMondrian, spatial extension of Mondrian
Extract also from spatial data sources
Transform also spatial operations (project, geocode,...)
projectGeoKettle
version2.0
sitewww.spatialytics.org/projects/geokettle/
licenseLGPL
projectGeoKettle
GeoNetwork
Catalog application to
manage spatial resources
Metadata editing
Search functions
Embeds GeoServer (optional)
projectGeoNetwork
version2.6.4
sitehttp://geonetwork-opensource.org/
licenseGPL
projectGeoNetwork
SEXTANTE
Spatial data analysis library
+300 geo-algorithms for raster and vector data processing
Graphical components to run and use those algorithmsIncluding graphical modeler
Integrates with many GIS toolsgvSig, OpenJUMP, uDIG
Split of from gvSig
projectSEXTANTE
version0.6
sitehttp://sextante.forge.osor.eu/
licenseMIT
projectSEXTANTE
projectSEXTANTE
Geomajas
Integrate, transform
and secure GIS data
(web) application framework / Spatial Application Server
Built on GeoTools, JTS, Spring, GWT, Hibernate Spatial
Faces for front-end/clientsGWT, SmartGWT, GeoJSON
Generic layers for data accessWMS, WFS, GeoTools data source, Hibernate Spatial
Plug-ins for extensionCaching and rasterization, printing/PDF, security services, geocoder
projectGeomajas
version1.9.0
sitehttp://www.geomajas.org/
licenseAGPL
projectGeomajas
Thin client
Server for heavy-liftingAllows security
Data transformation
Integration with
back-end processes
projectGeomajas
projectGeomajas
Q & A
Joachim Van der Auwerahttp://blog.progs.be/
Geosparcjoachim@geosparc.com
@joachimvda
http://geosparc.com/
Recommended