SlideShare une entreprise Scribd logo
1  sur  29
Télécharger pour lire hors ligne
Vector Tiles with GeoServer
and OpenLayers
David Blasby
Canada
Engineering Lead
Andreas Hocevar
Austria
OpenLayers Engineer
Gabriel Roldan
Argentina
Professional Services
Image Tiled Map
Single Open Street Map Image Tile
Real geometry and attribute data
(GeoJSON, TopoJSON, MVP, …)
A Tile of feature data
Vector Tiles
Vector Tiles versus Image Tiles
1. Client (not the server) decides on styling
2. Only need to tile the data once to have multiple maps
3. Drawn vectors can look better on high-resolution displays
4. Image Tiles are much easier to consume
5. There’s more know-how in working with Vectors
Empowering Efficient
GeoServer GeoWebCache OpenLayers
Outline of this talk
• OpenLayers Overview
• Vector Tile Maps
• Styling
• Advanced user interaction
• Demo
• 5 seconds to turn on Vector Tiles
• Vector Tiles in the OGC context
• Geoserver Rendering Process
• SLD to control Vector Tile Generation
5 Second to turn on Vector Tiles in Geoserver
…&SERVICE=WMS&REQUEST=GetMap&FORMAT=application/x-protobuf;type=mapbox-vector
Vector Tiles in the OGC Services Context
• WMS - Creating Maps
• WMTS - Tiling
• WFS - Feature Access
WFS and Vector Tiles
• Both return unstyled vector/attribute data
• WFS returns the underlying data unmodified
• Vector Tiles return modified (ready-to-render) features
WFS: Glorious Detail VTs: Easy to render
GeoServer Rendering Process Overview
Data Store Query
Generalize
SRS Xform
Remove small,
redundant features
Clip
GeoServer’s WMS has several different renders, including;
a)Streaming Renderer - used to make image maps
b)Vector Tiles Renderer - used to make vector tiles
They work almost the same!
SLD
Clipping
Requested area
Returned Area
Data Store Query
Generalize
SRS Xform
Remove small,
redundant features
Clip
SLD
SLD: Controlling what’s drawn
In GeoServer, use SLD to control map styling.
Three most important parts of SLD styling rules:
1. Scale
2. Filter
3. Actual style information (stroke/fill)
Controls what’s queried and “rendered”!
Data Store Query
Generalize
SRS Xform
Remove small,
redundant features
Clip
SLD
The world’s ugliest map
When the map scale is more
than 1:70,000 - include the
residential roads.
Tick!
Image Tiled Map Vector Tiles Map (same styling)
Changing the OpenLayers Style
Wait! Where are the Footways?
No rule for type=‘footway’
GeoWebCache will automatically
regenerate the cache.
FootWays shown with dashed style (OpenLayers)
OpenLayers
OpenLayers: Map everything
• Images, image tiles, vector data, tiled vector data
• Any projection
• Any orientation -> full rotation support
• Easy to use and powerful
If it has location, OpenLayers can render it!
How to create a vector tile layer
// The OGC way, step 1: WMTS from capabilities
var caps = new ol.format.WMTSCapabilities().read(data);
var wmts = new ol.source.WMTS(
ol.source.WMTS.optionsFromCapabilities(caps, {
layer: 'opengeo:california',
matrixSet: 'EPSG:3857',
format: 'application/x-protobuf;type=mapbox-vector'
})
);
How to create a vector tile layer
// The OGC way, step 2: url and tilegrid from WMTS
var layer = new ol.layer.VectorTile({
source: new ol.source.VectorTile({
format: new ol.format.MVT(),
tileUrlFunction: wmts.getTileUrlFunction(),
tileGrid: wmts.getTileGrid()
}),
style: function(feature, resolution) { /* ... */ }
});
Style streets nicely
[
new ol.style.Style({
zIndex: 1,
stroke: new ol.style.Stroke({color: '#fff', width: 4})
}),
new ol.style.Style({
zIndex: 2,
stroke: new ol.style.Stroke({color: '#ddd', width: 3})
})
]
Interactivity - info on hover
var info = document.createElement('div');
var overlay = new ol.Overlay({element: info});
map.addOverlay(overlay);
map.on('pointermove', function(e) {
var name = map.forEachFeatureAtPixel(e.pixel, function(feature) {
return feature.get('name');
});
info.style.display = name ? '' : 'none';
info.innerHTML = name;
overlay.setPosition(e.coordinate);
});
OpenLayers Demo
Q & A

Contenu connexe

Tendances

Tendances (12)

Open layers
Open layersOpen layers
Open layers
 
OpenLayers Feature Frenzy
OpenLayers Feature FrenzyOpenLayers Feature Frenzy
OpenLayers Feature Frenzy
 
G3m overview
G3m overviewG3m overview
G3m overview
 
51811680 open layers
51811680 open layers51811680 open layers
51811680 open layers
 
Glob3 Mobile. Point Cloud Streaming
Glob3 Mobile. Point Cloud StreamingGlob3 Mobile. Point Cloud Streaming
Glob3 Mobile. Point Cloud Streaming
 
Vectorial Streaming. Como FOSS4G Europe 2015
 Vectorial Streaming. Como  FOSS4G Europe 2015 Vectorial Streaming. Como  FOSS4G Europe 2015
Vectorial Streaming. Como FOSS4G Europe 2015
 
Genome Browser based on Google Maps API
Genome Browser based on Google Maps APIGenome Browser based on Google Maps API
Genome Browser based on Google Maps API
 
What's New for Cartography in ArcGIS 10.2
What's New for Cartography in ArcGIS 10.2What's New for Cartography in ArcGIS 10.2
What's New for Cartography in ArcGIS 10.2
 
GeoVisualization of My Home Neighborhood
GeoVisualization of My Home NeighborhoodGeoVisualization of My Home Neighborhood
GeoVisualization of My Home Neighborhood
 
WebGL 3D player
WebGL 3D playerWebGL 3D player
WebGL 3D player
 
Getting Oriented with MapKit: Everything you need to get started with the new...
Getting Oriented with MapKit: Everything you need to get started with the new...Getting Oriented with MapKit: Everything you need to get started with the new...
Getting Oriented with MapKit: Everything you need to get started with the new...
 
Y Tiles
Y TilesY Tiles
Y Tiles
 

Similaire à LocationTech Tour 2016 - Vectortiles

Barcelona - LIBER - OpenSource
Barcelona - LIBER - OpenSourceBarcelona - LIBER - OpenSource
Barcelona - LIBER - OpenSource
Petr Pridal
 
Going Mobile with HTML5
Going Mobile with HTML5Going Mobile with HTML5
Going Mobile with HTML5
John Reiser
 

Similaire à LocationTech Tour 2016 - Vectortiles (20)

Vector Tiles with GeoServer and OpenLayers
Vector Tiles with GeoServer and OpenLayersVector Tiles with GeoServer and OpenLayers
Vector Tiles with GeoServer and OpenLayers
 
LSIVIEWER 2.0-A CLIENT-ORIENTED ONLINE VISUALIZATION TOOL FOR GEOSPATIAL VECT...
LSIVIEWER 2.0-A CLIENT-ORIENTED ONLINE VISUALIZATION TOOL FOR GEOSPATIAL VECT...LSIVIEWER 2.0-A CLIENT-ORIENTED ONLINE VISUALIZATION TOOL FOR GEOSPATIAL VECT...
LSIVIEWER 2.0-A CLIENT-ORIENTED ONLINE VISUALIZATION TOOL FOR GEOSPATIAL VECT...
 
Building Mosaics
Building MosaicsBuilding Mosaics
Building Mosaics
 
An online viewer for Geospatial Vector Data using HTML5 Canvas and JavaScript
An online viewer for Geospatial Vector Data using HTML5 Canvas and JavaScript An online viewer for Geospatial Vector Data using HTML5 Canvas and JavaScript
An online viewer for Geospatial Vector Data using HTML5 Canvas and JavaScript
 
Neo4j Spatial - Backing a GIS with a true graph database
Neo4j Spatial - Backing a GIS with a true graph databaseNeo4j Spatial - Backing a GIS with a true graph database
Neo4j Spatial - Backing a GIS with a true graph database
 
Using Imagery in ArcGIS
Using Imagery in ArcGISUsing Imagery in ArcGIS
Using Imagery in ArcGIS
 
State of GeoServer 2012
State of GeoServer 2012State of GeoServer 2012
State of GeoServer 2012
 
Building Maps with Leaflet
Building Maps with LeafletBuilding Maps with Leaflet
Building Maps with Leaflet
 
Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)
Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)
Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)
 
OWC 2012 (Open Web Camp)
OWC 2012 (Open Web Camp)OWC 2012 (Open Web Camp)
OWC 2012 (Open Web Camp)
 
Leveraging sql server to improve vector display through point clustering
Leveraging sql server to improve vector display through point clusteringLeveraging sql server to improve vector display through point clustering
Leveraging sql server to improve vector display through point clustering
 
3D Visualization in ArcGIS Pro
3D Visualization in ArcGIS Pro3D Visualization in ArcGIS Pro
3D Visualization in ArcGIS Pro
 
Barcelona - LIBER - OpenSource
Barcelona - LIBER - OpenSourceBarcelona - LIBER - OpenSource
Barcelona - LIBER - OpenSource
 
Building Maps with Leaflet
Building Maps with LeafletBuilding Maps with Leaflet
Building Maps with Leaflet
 
Materi Geodatabase Management - Fellowship 2022.pdf
Materi Geodatabase Management - Fellowship 2022.pdfMateri Geodatabase Management - Fellowship 2022.pdf
Materi Geodatabase Management - Fellowship 2022.pdf
 
CATiled Layer - Melbourne Cocoheads February 2012
CATiled Layer - Melbourne Cocoheads February 2012CATiled Layer - Melbourne Cocoheads February 2012
CATiled Layer - Melbourne Cocoheads February 2012
 
World wind java sdk in progess
World wind java sdk in progessWorld wind java sdk in progess
World wind java sdk in progess
 
OpenStreetMap in 3D - current developments
OpenStreetMap in 3D - current developmentsOpenStreetMap in 3D - current developments
OpenStreetMap in 3D - current developments
 
Going Mobile with HTML5
Going Mobile with HTML5Going Mobile with HTML5
Going Mobile with HTML5
 
Spatiotemporal Raster Improvements in GeoServer
Spatiotemporal Raster Improvements in GeoServerSpatiotemporal Raster Improvements in GeoServer
Spatiotemporal Raster Improvements in GeoServer
 

Dernier

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Dernier (20)

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 

LocationTech Tour 2016 - Vectortiles

  • 1. Vector Tiles with GeoServer and OpenLayers
  • 2. David Blasby Canada Engineering Lead Andreas Hocevar Austria OpenLayers Engineer Gabriel Roldan Argentina Professional Services
  • 4. Single Open Street Map Image Tile
  • 5. Real geometry and attribute data (GeoJSON, TopoJSON, MVP, …) A Tile of feature data
  • 7. Vector Tiles versus Image Tiles 1. Client (not the server) decides on styling 2. Only need to tile the data once to have multiple maps 3. Drawn vectors can look better on high-resolution displays 4. Image Tiles are much easier to consume 5. There’s more know-how in working with Vectors Empowering Efficient
  • 8. GeoServer GeoWebCache OpenLayers Outline of this talk • OpenLayers Overview • Vector Tile Maps • Styling • Advanced user interaction • Demo • 5 seconds to turn on Vector Tiles • Vector Tiles in the OGC context • Geoserver Rendering Process • SLD to control Vector Tile Generation
  • 9. 5 Second to turn on Vector Tiles in Geoserver …&SERVICE=WMS&REQUEST=GetMap&FORMAT=application/x-protobuf;type=mapbox-vector
  • 10. Vector Tiles in the OGC Services Context • WMS - Creating Maps • WMTS - Tiling • WFS - Feature Access
  • 11. WFS and Vector Tiles • Both return unstyled vector/attribute data • WFS returns the underlying data unmodified • Vector Tiles return modified (ready-to-render) features WFS: Glorious Detail VTs: Easy to render
  • 12. GeoServer Rendering Process Overview Data Store Query Generalize SRS Xform Remove small, redundant features Clip GeoServer’s WMS has several different renders, including; a)Streaming Renderer - used to make image maps b)Vector Tiles Renderer - used to make vector tiles They work almost the same! SLD
  • 13. Clipping Requested area Returned Area Data Store Query Generalize SRS Xform Remove small, redundant features Clip SLD
  • 14. SLD: Controlling what’s drawn In GeoServer, use SLD to control map styling. Three most important parts of SLD styling rules: 1. Scale 2. Filter 3. Actual style information (stroke/fill) Controls what’s queried and “rendered”! Data Store Query Generalize SRS Xform Remove small, redundant features Clip SLD
  • 15. The world’s ugliest map When the map scale is more than 1:70,000 - include the residential roads.
  • 16.
  • 17. Tick!
  • 18. Image Tiled Map Vector Tiles Map (same styling)
  • 20. Wait! Where are the Footways? No rule for type=‘footway’ GeoWebCache will automatically regenerate the cache.
  • 21. FootWays shown with dashed style (OpenLayers)
  • 23. OpenLayers: Map everything • Images, image tiles, vector data, tiled vector data • Any projection • Any orientation -> full rotation support • Easy to use and powerful If it has location, OpenLayers can render it!
  • 24. How to create a vector tile layer // The OGC way, step 1: WMTS from capabilities var caps = new ol.format.WMTSCapabilities().read(data); var wmts = new ol.source.WMTS( ol.source.WMTS.optionsFromCapabilities(caps, { layer: 'opengeo:california', matrixSet: 'EPSG:3857', format: 'application/x-protobuf;type=mapbox-vector' }) );
  • 25. How to create a vector tile layer // The OGC way, step 2: url and tilegrid from WMTS var layer = new ol.layer.VectorTile({ source: new ol.source.VectorTile({ format: new ol.format.MVT(), tileUrlFunction: wmts.getTileUrlFunction(), tileGrid: wmts.getTileGrid() }), style: function(feature, resolution) { /* ... */ } });
  • 26. Style streets nicely [ new ol.style.Style({ zIndex: 1, stroke: new ol.style.Stroke({color: '#fff', width: 4}) }), new ol.style.Style({ zIndex: 2, stroke: new ol.style.Stroke({color: '#ddd', width: 3}) }) ]
  • 27. Interactivity - info on hover var info = document.createElement('div'); var overlay = new ol.Overlay({element: info}); map.addOverlay(overlay); map.on('pointermove', function(e) { var name = map.forEachFeatureAtPixel(e.pixel, function(feature) { return feature.get('name'); }); info.style.display = name ? '' : 'none'; info.innerHTML = name; overlay.setPosition(e.coordinate); });
  • 29. Q & A