Neo4j Spatial - GIS for the rest of us. OSCON Data 2011 #neo4j - - PowerPoint PPT Presentation

neo4j spatial gis for the rest
SMART_READER_LITE
LIVE PREVIEW

Neo4j Spatial - GIS for the rest of us. OSCON Data 2011 #neo4j - - PowerPoint PPT Presentation

Neo4j Spatial - GIS for the rest of us. OSCON Data 2011 #neo4j Peter Neubauer @peterneubauer Neo Technology peter@neotechnology.com Saturday, July 30, 2011 We are hiring. Now. Contact me. #neo4j @peterneubauer peter@neotechnology.com


slide-1
SLIDE 1

Peter Neubauer

Neo Technology #neo4j @peterneubauer peter@neotechnology.com

Neo4j Spatial - GIS for the rest

  • f us.

OSCON Data 2011

Saturday, July 30, 2011

slide-2
SLIDE 2

#neo4j @peterneubauer peter@neotechnology.com

We are hiring. Now. Contact me.

Saturday, July 30, 2011

slide-3
SLIDE 3

Neo4j - ?

Saturday, July 30, 2011

slide-4
SLIDE 4

The Neo4j model: Property Graph

Saturday, July 30, 2011

slide-5
SLIDE 5

The Neo4j model: Property Graph

1 2 3

Saturday, July 30, 2011

slide-6
SLIDE 6

The Neo4j model: Property Graph

1 2 3

Saturday, July 30, 2011

slide-7
SLIDE 7

The Neo4j model: Property Graph

name = “Emil” age = 29 sex = “yes” type = KNOWS time = 4 years type = car vendor = “SAAB” model = “95 Aero”

1 2 3

Saturday, July 30, 2011

slide-8
SLIDE 8

Saturday, July 30, 2011

slide-9
SLIDE 9

Impact Analytics, CMDB, Network Management, Provisioning

Saturday, July 30, 2011

slide-10
SLIDE 10

Show me!

Saturday, July 30, 2011

slide-11
SLIDE 11

Neo4j Spatial

Saturday, July 30, 2011

slide-12
SLIDE 12

Components

9

Saturday, July 30, 2011

slide-13
SLIDE 13

Core

Components

9

Saturday, July 30, 2011

slide-14
SLIDE 14

Core Storage

Components

9

Saturday, July 30, 2011

slide-15
SLIDE 15

Core Storage Search

Components

9

Saturday, July 30, 2011

slide-16
SLIDE 16

Core Storage Search GeoProcessing

Components

9

Saturday, July 30, 2011

slide-17
SLIDE 17

Core Storage Search GeoProcessing Import/export

Components

9

Saturday, July 30, 2011

slide-18
SLIDE 18

Core Storage Search GeoProcessing Import/export Extensions

Components

9

Saturday, July 30, 2011

slide-19
SLIDE 19

Core Storage Search GeoProcessing Import/export Extensions Geotools & GeoServer

Components

9

Saturday, July 30, 2011

slide-20
SLIDE 20

Core Storage Search GeoProcessing Import/export Extensions Geotools & GeoServer uDig

Components

9

Saturday, July 30, 2011

slide-21
SLIDE 21

Core Storage Search GeoProcessing Import/export Extensions Geotools & GeoServer uDig OpenStreetMap

Components

9

Saturday, July 30, 2011

slide-22
SLIDE 22

Neo4j dynamic layers

Layer1 Layer2 Layer3 Geometry Encoder Dynamic Query Dynamic Styles Dynamic Meta-Inf Connected domain data Neo4j Spatial GIS and Spatial stacks Multidim Indexes

Saturday, July 30, 2011

slide-23
SLIDE 23

Topics

Open Street Map Layers Indexes Styling Geoprocessing Routing Examples

11

Saturday, July 30, 2011

slide-24
SLIDE 24

Open StreetMap

Saturday, July 30, 2011

slide-25
SLIDE 25

OpenStreetMap - Topology

13

Saturday, July 30, 2011

slide-26
SLIDE 26

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

slide-27
SLIDE 27

OpenStreetMap

Saturday, July 30, 2011

slide-28
SLIDE 28

OpenStreetMap

Saturday, July 30, 2011

slide-29
SLIDE 29

OpenStreetMap

Saturday, July 30, 2011

slide-30
SLIDE 30

OpenStreetMap

OSM

Saturday, July 30, 2011

slide-31
SLIDE 31

OpenStreetMap

OSM

Dynamic Layers

Saturday, July 30, 2011

slide-32
SLIDE 32

OpenStreetMap

OSM Index (RTree)

Dynamic Layers

Saturday, July 30, 2011

slide-33
SLIDE 33

Layers

Saturday, July 30, 2011

slide-34
SLIDE 34

From Graph to Layer

Saturday, July 30, 2011

slide-35
SLIDE 35

From Graph to Layer

GeometryEncoder - encode, decode

Saturday, July 30, 2011

slide-36
SLIDE 36

From Graph to Layer

GeometryEncoder - encode, decode Property (wkt)

Saturday, July 30, 2011

slide-37
SLIDE 37

From Graph to Layer

GeometryEncoder - encode, decode Property (wkt) Properties (lon, lat)

Saturday, July 30, 2011

slide-38
SLIDE 38

From Graph to Layer

GeometryEncoder - encode, decode Property (wkt) Properties (lon, lat) Subgraph (ways, polygons)

Saturday, July 30, 2011

slide-39
SLIDE 39

From Graph to Layer

GeometryEncoder - encode, decode Property (wkt) Properties (lon, lat) Subgraph (ways, polygons) Domain specific (e.g. OSM)

Saturday, July 30, 2011

slide-40
SLIDE 40

From Graph to Layer

GeometryEncoder - encode, decode Property (wkt) Properties (lon, lat) Subgraph (ways, polygons) Domain specific (e.g. OSM) OSM Way encoding/decoding

Saturday, July 30, 2011

slide-41
SLIDE 41

From Graph to Layer

GeometryEncoder - 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

slide-42
SLIDE 42

From Graph to Layer

GeometryEncoder - 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

slide-43
SLIDE 43

From Graph to Layer

GeometryEncoder - 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

slide-44
SLIDE 44

From Graph to Layer

GeometryEncoder - 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

slide-45
SLIDE 45

Dynamic Layers, uDig

Saturday, July 30, 2011

slide-46
SLIDE 46

Dynamic Layers, GeoServer

Saturday, July 30, 2011

slide-47
SLIDE 47

Indexes

Saturday, July 30, 2011

slide-48
SLIDE 48

Multiple indexes - GIS

Illustrations: Wikipedia

Saturday, July 30, 2011

slide-49
SLIDE 49

OpenStreetMap

Saturday, July 30, 2011

slide-50
SLIDE 50

OpenStreetMap

OSM Index (RTree)

Dynamic Layers

Saturday, July 30, 2011

slide-51
SLIDE 51

In - graph indexing

Index<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

slide-52
SLIDE 52

Styling

Saturday, July 30, 2011

slide-53
SLIDE 53

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

slide-54
SLIDE 54

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

slide-55
SLIDE 55

Styling Ruby DSL

require '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' end end sld

Saturday, July 30, 2011

slide-56
SLIDE 56

Dynamic Layers, styling

Saturday, July 30, 2011

slide-57
SLIDE 57

Dynamic Layers, styling

Saturday, July 30, 2011

slide-58
SLIDE 58

Dynamic Layers, styling

Saturday, July 30, 2011

slide-59
SLIDE 59

Dynamic Layers, styling

Saturday, July 30, 2011

slide-60
SLIDE 60

Geoprocessing

Saturday, July 30, 2011

slide-61
SLIDE 61

GSoC: PostGIS -> OSM Graph

33

Saturday, July 30, 2011

slide-62
SLIDE 62

GSoC: PostGIS -> OSM Graph

Outputs: GeoJSON, KML

33

Saturday, July 30, 2011

slide-63
SLIDE 63

GSoC: PostGIS -> OSM Graph

Outputs: GeoJSON, KML

33

Saturday, July 30, 2011

slide-64
SLIDE 64

GSoC: PostGIS -> OSM Graph

Outputs: GeoJSON, KML Accessors: ST_EndPoint

33

Saturday, July 30, 2011

slide-65
SLIDE 65

GSoC: PostGIS -> OSM Graph

Outputs: GeoJSON, KML Accessors: ST_EndPoint

33

Saturday, July 30, 2011

slide-66
SLIDE 66

GSoC: PostGIS -> OSM Graph

Outputs: GeoJSON, KML Accessors: ST_EndPoint Processing: ST_CLosest, ST_Disjoint

33

Saturday, July 30, 2011

slide-67
SLIDE 67

GSoC: PostGIS -> OSM Graph

Outputs: GeoJSON, KML Accessors: ST_EndPoint Processing: ST_CLosest, ST_Disjoint

33

Saturday, July 30, 2011

slide-68
SLIDE 68

GSoC: PostGIS -> OSM Graph

Outputs: GeoJSON, KML Accessors: ST_EndPoint Processing: ST_CLosest, ST_Disjoint Search: SearchWithin, SearchClosest, Route, etc

33

Saturday, July 30, 2011

slide-69
SLIDE 69

GSoC: PostGIS -> OSM Graph

Outputs: GeoJSON, KML Accessors: ST_EndPoint Processing: ST_CLosest, ST_Disjoint Search: SearchWithin, SearchClosest, Route, etc

33

Saturday, July 30, 2011

slide-70
SLIDE 70

GSoC: PostGIS -> OSM Graph

Outputs: GeoJSON, KML Accessors: ST_EndPoint Processing: ST_CLosest, ST_Disjoint Search: SearchWithin, SearchClosest, Route, etc Thanks Andreas Wilhelm!

33

Saturday, July 30, 2011

slide-71
SLIDE 71

Routing

Saturday, July 30, 2011

slide-72
SLIDE 72

Routing

Saturday, July 30, 2011

slide-73
SLIDE 73

Graph - Algos, A*

Saturday, July 30, 2011

slide-74
SLIDE 74

h"p://www.transportdublin.ie/ ¡-­‑ ¡Patrick ¡Fitzgerald ¡on ¡Neo4j

Saturday, July 30, 2011

slide-75
SLIDE 75

Neo4j Spatial examples

Saturday, July 30, 2011

slide-76
SLIDE 76

Polymap3

Saturday, July 30, 2011

slide-77
SLIDE 77

AWE

Saturday, July 30, 2011

slide-78
SLIDE 78

Cell network analysis

Saturday, July 30, 2011

slide-79
SLIDE 79

Next steps

Saturday, July 30, 2011

slide-80
SLIDE 80

Next steps

Neo4j Spatial

Saturday, July 30, 2011

slide-81
SLIDE 81

Next steps

Neo4j Spatial Cypher, Gremlin, CQL dynamic querying

Saturday, July 30, 2011

slide-82
SLIDE 82

Next steps

Neo4j Spatial Cypher, Gremlin, CQL dynamic querying Graph Geoprocessing domain level - GSoC 2011

Saturday, July 30, 2011

slide-83
SLIDE 83

Next steps

Neo4j Spatial Cypher, Gremlin, CQL dynamic querying Graph Geoprocessing domain level - GSoC 2011 Index Performance optimizations

Saturday, July 30, 2011

slide-84
SLIDE 84

Next steps

Neo4j Spatial Cypher, Gremlin, CQL dynamic querying Graph Geoprocessing domain level - GSoC 2011 Index Performance optimizations Pluggable indexing, Composite Index

Saturday, July 30, 2011

slide-85
SLIDE 85

Next steps

Neo4j 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

slide-86
SLIDE 86

Next steps

Neo4j 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

slide-87
SLIDE 87

Next steps

Neo4j 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

slide-88
SLIDE 88

Next steps

Neo4j 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

slide-89
SLIDE 89

Next steps

Neo4j 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

slide-90
SLIDE 90

Get involved!

http://github.com/neo4j/neo4j-spatial http://neo4j.org

Saturday, July 30, 2011

slide-91
SLIDE 91

http://neotechnology.com

44

And - we are hiring!

Saturday, July 30, 2011