neo4j spatial - gis for the rest of us
TRANSCRIPT
Peter NeubauerNeo Technology
#neo4j@[email protected]
Neo4j Spatial - GIS for the rest
of us. OSCON Data 2011
Saturday, July 30, 2011
Neo4j - ?
Saturday, July 30, 2011
The Neo4j model: Property Graph
Saturday, July 30, 2011
The Neo4j model: Property Graph
1 2
3
Saturday, July 30, 2011
The Neo4j model: Property Graph
1 2
3
Saturday, July 30, 2011
The Neo4j model: Property Graphname = “Emil”age = 29sex = “yes”
type = KNOWStime = 4 years
type = carvendor = “SAAB”model = “95 Aero”
1 2
3
Saturday, July 30, 2011
Saturday, July 30, 2011
Impact Analytics, CMDB, Network Management, Provisioning
Saturday, July 30, 2011
Show me!
Saturday, July 30, 2011
Neo4j Spatial
Saturday, July 30, 2011
Components
9Saturday, July 30, 2011
Core
Components
9Saturday, July 30, 2011
Core
Storage
Components
9Saturday, July 30, 2011
Core
Storage
Search
Components
9Saturday, July 30, 2011
Core
Storage
Search
GeoProcessing
Components
9Saturday, July 30, 2011
Core
Storage
Search
GeoProcessing
Import/export
Components
9Saturday, July 30, 2011
Core
Storage
Search
GeoProcessing
Import/export
Extensions
Components
9Saturday, July 30, 2011
Core
Storage
Search
GeoProcessing
Import/export
Extensions
Geotools & GeoServer
Components
9Saturday, July 30, 2011
Core
Storage
Search
GeoProcessing
Import/export
Extensions
Geotools & GeoServer
uDig
Components
9Saturday, July 30, 2011
Core
Storage
Search
GeoProcessing
Import/export
Extensions
Geotools & GeoServer
uDig
OpenStreetMap
Components
9Saturday, July 30, 2011
Neo4j dynamic layers
Layer1
Layer2
Layer3
GeometryEncoderDynamic
QueryDynamic
StylesDynamicMeta-Inf
Connected domain data Neo4j Spatial GIS and Spatial stacks
MultidimIndexes
Saturday, July 30, 2011
TopicsOpen Street Map
Layers
Indexes
Styling
Geoprocessing
Routing
Examples
11Saturday, July 30, 2011
Open StreetMap
Saturday, July 30, 2011
OpenStreetMap - Topology
13Saturday, July 30, 2011
OSM Files<?xml version="1.0" encoding="UTF-8"?><osm version="0.6" generator="CGImap 0.0.2"> <bounds minlat="56.0437000" minlon="12.9388000" maxlat="56.0761000" maxlon="13.0109000"/> <node id="371662020" lat="56.0709040" lon="12.9639158" user="Grillo" uid="13957" visible="true" version="2" changeset="5465617" timestamp="2010-08-11T19:50:23Z"/>.... <way id="72090582" user="Craig Taverner" uid="48197" visible="true" version="1" changeset="5474347" timestamp="2010-08-12T16:15:06Z"> <nd ref="371662020"/> <nd ref="857081476"/> <nd ref="857081950"/> <nd ref="857081819"/> <nd ref="857081796"/> <nd ref="857081692"/> <nd ref="857081617"/> <nd ref="857081523"/> <tag k="highway" v="residential"/> <tag k="name" v="Nybrodalsvägen"/> </way></osm>
Saturday, July 30, 2011
OpenStreetMap
Saturday, July 30, 2011
OpenStreetMap
Saturday, July 30, 2011
OpenStreetMap
Saturday, July 30, 2011
OpenStreetMap
OSM
Saturday, July 30, 2011
OpenStreetMap
OSMDynamicLayers
Saturday, July 30, 2011
OpenStreetMap
OSM
Index (RTree)
DynamicLayers
Saturday, July 30, 2011
Layers
Saturday, July 30, 2011
From Graph to Layer
Saturday, July 30, 2011
From Graph to LayerGeometryEncoder - encode, decode
Saturday, July 30, 2011
From Graph to LayerGeometryEncoder - encode, decode
Property (wkt)
Saturday, July 30, 2011
From Graph to LayerGeometryEncoder - encode, decode
Property (wkt)
Properties (lon, lat)
Saturday, July 30, 2011
From Graph to LayerGeometryEncoder - encode, decode
Property (wkt)
Properties (lon, lat)
Subgraph (ways, polygons)
Saturday, July 30, 2011
From Graph to LayerGeometryEncoder - encode, decode
Property (wkt)
Properties (lon, lat)
Subgraph (ways, polygons)
Domain specific (e.g. OSM)
Saturday, July 30, 2011
From Graph to LayerGeometryEncoder - encode, decode
Property (wkt)
Properties (lon, lat)
Subgraph (ways, polygons)
Domain specific (e.g. OSM)
OSM Way encoding/decoding
Saturday, July 30, 2011
From Graph to LayerGeometryEncoder - encode, decode
Property (wkt)
Properties (lon, lat)
Subgraph (ways, polygons)
Domain specific (e.g. OSM)
OSM Way encoding/decoding
CRS, Geometry type
Saturday, July 30, 2011
From Graph to LayerGeometryEncoder - encode, decode
Property (wkt)
Properties (lon, lat)
Subgraph (ways, polygons)
Domain specific (e.g. OSM)
OSM Way encoding/decoding
CRS, Geometry type
Styling
Saturday, July 30, 2011
From Graph to LayerGeometryEncoder - encode, decode
Property (wkt)
Properties (lon, lat)
Subgraph (ways, polygons)
Domain specific (e.g. OSM)
OSM Way encoding/decoding
CRS, Geometry type
Styling
Dynamic Layers
Saturday, July 30, 2011
From Graph to LayerGeometryEncoder - encode, decode
Property (wkt)
Properties (lon, lat)
Subgraph (ways, polygons)
Domain specific (e.g. OSM)
OSM Way encoding/decoding
CRS, Geometry type
Styling
Dynamic Layers
Search
Saturday, July 30, 2011
Dynamic Layers, uDig
Saturday, July 30, 2011
Dynamic Layers, GeoServer
Saturday, July 30, 2011
Indexes
Saturday, July 30, 2011
Multiple indexes - GIS
Illustrations: WikipediaSaturday, July 30, 2011
OpenStreetMap
Saturday, July 30, 2011
OpenStreetMap
OSM
Index (RTree)
DynamicLayers
Saturday, July 30, 2011
In - graph indexingIndex<Node> index = db.index().forNodes( "layer1");Node n1 = db.createNode();n1.setProperty( "lat", (double)56.2 );n1.setProperty( "lon", (double)15.3 );index.add( n1 );
Java:index.query( LayerNodeIndex.BBOX_QUERY, "[15.0, 16.0, 56.0, 57.0]" );
Cypher:START poi=(layer1,'bbox:[15.0, 16.0, 56.0, 57.0]') MATCH (poi) -[r] - (x) RETURN poi, r~TYPE, x.layer?
Gremlin:g.idx('node')[[layer1: 'bbox:[15.0, 16.0, 56.0, 57.0]']]
Saturday, July 30, 2011
Styling
Saturday, July 30, 2011
Styling SLD<FeatureTypeStyle> <Rule> <ogc:Filter> <ogc:And> <ogc:PropertyIsEqualTo> <ogc:Function name="geometryType"> <ogc:PropertyName>the_geom</ogc:PropertyName> </ogc:Function> <ogc:Literal>LineString</ogc:Literal> </ogc:PropertyIsEqualTo> <ogc:Not> <ogc:PropertyIsNull> <ogc:PropertyName>highway</ogc:PropertyName> </ogc:PropertyIsNull> </ogc:Not> <ogc:PropertyIsEqualTo> <ogc:PropertyName>highway</ogc:PropertyName> <ogc:Literal>residential</ogc:Literal> </ogc:PropertyIsEqualTo> </ogc:And> </ogc:Filter> <Symbolizers>.......</> </Rule></FeatureTypeStyle>
Saturday, July 30, 2011
Styling SLD<FeatureTypeStyle> <Rule> <Filter>.....</Filter> <LineSymbolizer> <Stroke> <CssParameter name="stroke">#909090</CssParameter> <CssParameter name="stroke-width">3</CssParameter> </Stroke> </LineSymbolizer> <LineSymbolizer> <Stroke> <CssParameter name="stroke">#ffff80</CssParameter> <CssParameter name="stroke-width">1</CssParameter> </Stroke> </LineSymbolizer> </Rule></FeatureTypeStyle>
Saturday, July 30, 2011
Styling Ruby DSLrequire 'amanzi/sld'
Amanzi::SLD::Config.config[:geometry_property] = 'the_geom'#Amanzi::SLD::Config.config[:verbose] = true
sld = Amanzi::SLD::Document.new "Example Neo4j Spatial OSM Style"
sld.comment "A style for residential streets"sld. add_line_symbolizer(:stroke => '#909090', :stroke_width => 3). add_line_symbolizer(:stroke => '#ffff80', :stroke_width => 1) do |f| f.op(:and) do |f| f.geometry = 'LineString' f.property.exists? 'highway' f.property['highway'] = 'residential' endendsld
Saturday, July 30, 2011
Dynamic Layers, styling
Saturday, July 30, 2011
Dynamic Layers, styling
Saturday, July 30, 2011
Dynamic Layers, styling
Saturday, July 30, 2011
Dynamic Layers, styling
Saturday, July 30, 2011
Geoprocessing
Saturday, July 30, 2011
GSoC: PostGIS -> OSM Graph
33Saturday, July 30, 2011
GSoC: PostGIS -> OSM GraphOutputs: GeoJSON, KML
33Saturday, July 30, 2011
GSoC: PostGIS -> OSM GraphOutputs: GeoJSON, KML
33Saturday, July 30, 2011
GSoC: PostGIS -> OSM GraphOutputs: GeoJSON, KML
Accessors: ST_EndPoint
33Saturday, July 30, 2011
GSoC: PostGIS -> OSM GraphOutputs: GeoJSON, KML
Accessors: ST_EndPoint
33Saturday, July 30, 2011
GSoC: PostGIS -> OSM GraphOutputs: GeoJSON, KML
Accessors: ST_EndPoint
Processing: ST_CLosest, ST_Disjoint
33Saturday, July 30, 2011
GSoC: PostGIS -> OSM GraphOutputs: GeoJSON, KML
Accessors: ST_EndPoint
Processing: ST_CLosest, ST_Disjoint
33Saturday, July 30, 2011
GSoC: PostGIS -> OSM GraphOutputs: GeoJSON, KML
Accessors: ST_EndPoint
Processing: ST_CLosest, ST_Disjoint
Search: SearchWithin, SearchClosest, Route, etc
33Saturday, July 30, 2011
GSoC: PostGIS -> OSM GraphOutputs: GeoJSON, KML
Accessors: ST_EndPoint
Processing: ST_CLosest, ST_Disjoint
Search: SearchWithin, SearchClosest, Route, etc
33Saturday, July 30, 2011
GSoC: PostGIS -> OSM GraphOutputs: GeoJSON, KML
Accessors: ST_EndPoint
Processing: ST_CLosest, ST_Disjoint
Search: SearchWithin, SearchClosest, Route, etc
Thanks Andreas Wilhelm!33
Saturday, July 30, 2011
Routing
Saturday, July 30, 2011
Routing
Saturday, July 30, 2011
Graph - Algos, A*
Saturday, July 30, 2011
h"p://www.transportdublin.ie/ -‐ Patrick Fitzgerald on Neo4jSaturday, July 30, 2011
Neo4j Spatial examples
Saturday, July 30, 2011
Polymap3
Saturday, July 30, 2011
AWE
Saturday, July 30, 2011
Cell network analysis
Saturday, July 30, 2011
Next steps
Saturday, July 30, 2011
Next stepsNeo4j Spatial
Saturday, July 30, 2011
Next stepsNeo4j Spatial
Cypher, Gremlin, CQL dynamic querying
Saturday, July 30, 2011
Next stepsNeo4j Spatial
Cypher, Gremlin, CQL dynamic querying
Graph Geoprocessing domain level - GSoC 2011
Saturday, July 30, 2011
Next stepsNeo4j Spatial
Cypher, Gremlin, CQL dynamic querying
Graph Geoprocessing domain level - GSoC 2011
Index Performance optimizations
Saturday, July 30, 2011
Next stepsNeo4j Spatial
Cypher, Gremlin, CQL dynamic querying
Graph Geoprocessing domain level - GSoC 2011
Index Performance optimizations
Pluggable indexing, Composite Index
Saturday, July 30, 2011
Next stepsNeo4j Spatial
Cypher, Gremlin, CQL dynamic querying
Graph Geoprocessing domain level - GSoC 2011
Index Performance optimizations
Pluggable indexing, Composite Index
Routing API support
Saturday, July 30, 2011
Next stepsNeo4j Spatial
Cypher, Gremlin, CQL dynamic querying
Graph Geoprocessing domain level - GSoC 2011
Index Performance optimizations
Pluggable indexing, Composite Index
Routing API support
OSM
Saturday, July 30, 2011
Next stepsNeo4j Spatial
Cypher, Gremlin, CQL dynamic querying
Graph Geoprocessing domain level - GSoC 2011
Index Performance optimizations
Pluggable indexing, Composite Index
Routing API support
OSM
uDig OSM Topology editor - GSoC 2011
Saturday, July 30, 2011
Next stepsNeo4j Spatial
Cypher, Gremlin, CQL dynamic querying
Graph Geoprocessing domain level - GSoC 2011
Index Performance optimizations
Pluggable indexing, Composite Index
Routing API support
OSM
uDig OSM Topology editor - GSoC 2011
OSM tests Germany, US
Saturday, July 30, 2011
Next stepsNeo4j Spatial
Cypher, Gremlin, CQL dynamic querying
Graph Geoprocessing domain level - GSoC 2011
Index Performance optimizations
Pluggable indexing, Composite Index
Routing API support
OSM
uDig OSM Topology editor - GSoC 2011
OSM tests Germany, US
Stitching for OSM datasets
Saturday, July 30, 2011
Get involved!
http://github.com/neo4j/neo4j-spatial
http://neo4j.org
Saturday, July 30, 2011
http://neotechnology.com44
And - we are hiring!
Saturday, July 30, 2011