SlideShare a Scribd company logo
MapBox Styles in GeoServer and OpenLayers
David Vick
● 20 years of experience developing
software solutions for the
Government.
● 2 years at Boundless and just this
year began contributing to Open
Source.
Who are we?
Torben Barsballe
● Software developer at Boundless for the
past 2.5 years
● Committer on both GeoServer and
GeoTools
● Contributor to OpenLayers
● From Victoria, BC
Boundless Spatial is a GIS company focused on open source
solutions. Boundless delivers a scalable, open GIS platform that
includes Exchange, Suite, Desktop and Connect.
For more information, visit boundlessgeo.com
Who is Boundless?
Outline
● What are MapBox Styles, and how do they make styling easier?
○ Why MapBox Styles matter
○ Capabilities
● MapBox Styles in GeoServer
● MapBox Styles in OpenLayers
● Demo
● Questions
What are MapBox Styles?
What are MapBox Styles?
MapBox Style is a styling language developed by MapBox.
● Open specification
● Written in JSON
● Primarily intended for client side (vector tile) styling
The full style specification is available at
https://www.mapbox.com/mapbox-gl-js/style-spec
Multiple Implementations:
● MapBox GL
● MapBox APIs (macOS, iOS, Android)
● GeoServer
● OpenLayers
Open Specification
JSON Styling
● Easy to manipulate using standard
web tools
● Easy to read and write
JSON Styling
{
"version": 8,
"layers": [
{
"id": "default_point",
"type": "circle",
"source": "test-source",
"source-layer": "place_label",
"layout": {
"visibility": "visible"
},
"paint": {
"circle-color": "#FF0000",
"circle-opacity": 1,
"circle-radius": 6,
"circle-stroke-opacity": 0,
}
}
]
}
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld
StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NamedLayer>
<Name>default_point</Name>
<UserStyle>
<Title>Default Point</Title>
<Abstract>A sample style that draws a point</Abstract>
<FeatureTypeStyle>
<Rule>
<Name>rule1</Name>
<Title>Red Square</Title>
<Abstract>A 6 pixel circle with a red fill and no stroke</Abstract>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>circle</WellKnownName>
<Fill>
<CssParameter name="fill">#FF0000</CssParameter>
</Fill>
</Mark>
<Size>6</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
SLD Styling - XML
As JSON, MapBox styles are relatively
easy to read and write when
compared with other styling languages
such as GeoServer's SLD language.
Vector tiles
● Like a raster map tile, but comprised of unstyled vector data
● MapBox Vector Tiles use the Google protobuf format
● Supports dynamic, client-side styling
Vector Tiles & Client-side styling
What Can MapBox Styles Do?
Features
• Zoom level styling
• Data driven styling
• Zoom and Data styling
• Filtering
• Drawing order
Root Properties
• Version
• Name
• Sprite
• Glyph
• Sources
• Layers
MapBox Styles - Root Properties
{
"version": 8,
"name": "Mapbox Streets",
"sprite": "mapbox://sprites/mapbox/streets-v8",
"glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf",
"sources": {...},
"layers": [...]
}
MapBox Styles - Sources
● Vector
● GeoJSON
● Raster
● Image
● Video
● Canvas
MapBox Styles - Layers
A Style’s layers property list all of the layers available in that style. The type of layer is specified by the
type property.
• Background
• Fill
• Line
• Symbol
• Raster
• Circle
• Fill Extrusion
"layers": [
{
"id": "water",
"source": "mapbox-streets",
"source-layer": "water",
"type": "fill",
"paint": {
"fill-color": "#00ffff"
}
}
]
Data-driven Styling
MapBox Styles support the concept of Data-Driven Styling through
the use of Property Functions.
Constant: Property Function:
{
“Circle-color”: {
“Property”: “temperature”,
“Stops”: [
[0, ‘blue’],
[100, ‘red’]
]
}
}
{
“Circle-color”: “blue”
}
Functions and Zoom
Zoom-and-property functions allow the appearance of a map feature to change with both its properties and
zoom. Each stop is an array with two elements, the first is an object with a property input value and a zoom, and
the second is a function output value.
{
"circle-radius": {
"property": "rating",
"stops": [
// zoom is 0 and "rating" is 0 -> circle radius will be 0px
[{zoom: 0, value: 0}, 0],
// zoom is 0 and "rating" is 5 -> circle radius will be 5px
[{zoom: 0, value: 5}, 5],
// zoom is 20 and "rating" is 0 -> circle radius will be 0px
[{zoom: 20, value: 0}, 0],
// zoom is 20 and "rating" is 5 -> circle radius will be 20px
[{zoom: 20, value: 5}, 20]
]
}
}
GeoServer Implementation
Supported / Unsupported MapBox properties
Implemented in GeoTools as a module consumed by GeoServer
Implemented properties
• Sources
• GeoServer does not use the Sources property in the style document at this time. The style is
applied to whichever GeoServer layer the user selects.
• Supported Layer Types
• [Background, Fill, Line, Symbol, Raster, Circle, Fill-Extrusion]
• Supported Data Types
• [Color, Enum, String, Boolean, Number, Array, Function, Filter]
• Layer Properties Not Supported
• *-translate-anchor, icon-rotation-alignment, icon-pitch-alignment
GeoServer MapBox Style Specification
Why is this cool?
• We are able to read the MapBox style specification and translate
that into SLD enabling the user to use JSON while still creating OGC
compliant styles.
• Able to extend SLD with geometry transformations.
• We are adding to the GeoTools code base by adding capabilities
for several new functions such as exponential functions and Hue
Rotation.
MapBox Styles in OpenLayers
ol-mapbox-style plugin:
● Constructs an OpenLayers app from a MapBox style
● Can display local or remote styles
ol-mapbox-style
Installing ol-mapbox-style
npm install ol-mapbox-style
OR
https://github.com/boundlessgeo/ol-mapbox-style
Can create an OpenLayers application in one line of javascript:
Using ol-mapbox-style
'map' - an element in the HTML document
'data/boston.json' - URL to a MapBox style
Rendering a map
Data from BostonOpenData (PDDL 1.0)
Supported Features
Current Features
● Vector, GeoJSON, and Raster sources
● Background, Circle, Line, Fill, and Symbol layers
○ All features not yet implemented
○ Only supports system fonts
○ Most alignment/placement features not supported
○ Data-driven styling is supported
Upcoming features:
● Improved labeling for vector tiles
Demo
● Prerequisites
● Creating a MapBox Style in GeoServer
● Exposing Vector Tiles using GeoWebCache
● Using a MapBox Style with Vector Tiles in OpenLayers
Demo
Prerequisites
GeoServer
● Version 2.11.1 or newer
● MapBox Style community module
● Vector Tiles community module
OpenLayers
● Latest release (v4.3.1)
● ol-mapbox-style plugin (v2.6.1)
Creating a Style in GeoServer
Data from BostonOpenData (PDDL 1.0)
Publishing Vector Tiles in GeoWebCache
Displaying as a map in OpenLayers
demo.js
demo.html boston.json
Displaying as a map in OpenLayers
Displaying as a map in OpenLayers
Data from BostonOpenData (PDDL 1.0)
Questions and Closing
Questions?
Discover, Learn,
Collaborate, and Share
With GIS Professionals
connect.boundlessgeo.com
Check out our booth #103

More Related Content

What's hot

공간정보 거점대학 - OpenLayers의 고급 기능 이해 및 실습
 공간정보 거점대학 - OpenLayers의 고급 기능 이해 및 실습 공간정보 거점대학 - OpenLayers의 고급 기능 이해 및 실습
공간정보 거점대학 - OpenLayers의 고급 기능 이해 및 실습
HaNJiN Lee
 
Introduction To PostGIS
Introduction To PostGISIntroduction To PostGIS
Introduction To PostGIS
mleslie
 
QGIS 활용
QGIS 활용QGIS 활용
QGIS 활용
Sungjin Kang
 
Introduction to D3.js
Introduction to D3.jsIntroduction to D3.js
Introduction to D3.js
Knoldus Inc.
 
Raster data in GeoServer and GeoTools: Achievements, issues and future devel...
Raster data in GeoServer and GeoTools:  Achievements, issues and future devel...Raster data in GeoServer and GeoTools:  Achievements, issues and future devel...
Raster data in GeoServer and GeoTools: Achievements, issues and future devel...
GeoSolutions
 
OpenLayer's basics
OpenLayer's basicsOpenLayer's basics
OpenLayer's basics
Oleksii Prohonnyi
 
[공간정보연구원] 1일차 - QGIS 개요 및 기초
[공간정보연구원] 1일차 - QGIS 개요 및 기초[공간정보연구원] 1일차 - QGIS 개요 및 기초
[공간정보연구원] 1일차 - QGIS 개요 및 기초
slhead1
 
[QGIS] 수치지도를 이용한 DEM 생성과 지형분석
[QGIS] 수치지도를 이용한 DEM 생성과 지형분석[QGIS] 수치지도를 이용한 DEM 생성과 지형분석
[QGIS] 수치지도를 이용한 DEM 생성과 지형분석
MinPa Lee
 
공간SQL을 이용한 공간자료분석 기초실습
공간SQL을 이용한 공간자료분석 기초실습공간SQL을 이용한 공간자료분석 기초실습
공간SQL을 이용한 공간자료분석 기초실습
BJ Jang
 
공간정보아카데미 - 오픈소스GIS 분석가과정 - QGIS 공간분석일반
공간정보아카데미 - 오픈소스GIS 분석가과정 - QGIS 공간분석일반공간정보아카데미 - 오픈소스GIS 분석가과정 - QGIS 공간분석일반
공간정보아카데미 - 오픈소스GIS 분석가과정 - QGIS 공간분석일반
MinPa Lee
 
야생동물(Brown bear) 행동권 · 서식지 분석하기
야생동물(Brown bear) 행동권 · 서식지 분석하기야생동물(Brown bear) 행동권 · 서식지 분석하기
야생동물(Brown bear) 행동권 · 서식지 분석하기
Byeong-Hyeok Yu
 
QGIS server: the good, the not-so-good and the ugly
QGIS server: the good, the not-so-good and the uglyQGIS server: the good, the not-so-good and the ugly
QGIS server: the good, the not-so-good and the ugly
Ross McDonald
 
Raster Data In GeoServer And GeoTools: Achievements, Issues And Future Develo...
Raster Data In GeoServer And GeoTools: Achievements, Issues And Future Develo...Raster Data In GeoServer And GeoTools: Achievements, Issues And Future Develo...
Raster Data In GeoServer And GeoTools: Achievements, Issues And Future Develo...
GeoSolutions
 
State of OpenGXT: 오픈소스 공간분석엔진
State of OpenGXT: 오픈소스 공간분석엔진State of OpenGXT: 오픈소스 공간분석엔진
State of OpenGXT: 오픈소스 공간분석엔진
MinPa Lee
 
Serving earth observation data with GeoServer: addressing real world requirem...
Serving earth observation data with GeoServer: addressing real world requirem...Serving earth observation data with GeoServer: addressing real world requirem...
Serving earth observation data with GeoServer: addressing real world requirem...
GeoSolutions
 
Geo server 성능향상을 위한 튜닝 기법 20111028
Geo server 성능향상을 위한 튜닝 기법 20111028Geo server 성능향상을 위한 튜닝 기법 20111028
Geo server 성능향상을 위한 튜닝 기법 20111028BJ Jang
 
PostGIS and Spatial SQL
PostGIS and Spatial SQLPostGIS and Spatial SQL
PostGIS and Spatial SQL
Todd Barr
 
OpenStreetMap 기반의 Mapbox 오픈소스 매핑 서비스
OpenStreetMap 기반의 Mapbox 오픈소스 매핑 서비스OpenStreetMap 기반의 Mapbox 오픈소스 매핑 서비스
OpenStreetMap 기반의 Mapbox 오픈소스 매핑 서비스
Kyu-sung Choi
 
Spatial Indexing
Spatial IndexingSpatial Indexing
Spatial Indexing
torp42
 
선박식별정보를 이용한 어업활동 공간밀도 가시화
선박식별정보를 이용한 어업활동 공간밀도 가시화선박식별정보를 이용한 어업활동 공간밀도 가시화
선박식별정보를 이용한 어업활동 공간밀도 가시화
r-kor
 

What's hot (20)

공간정보 거점대학 - OpenLayers의 고급 기능 이해 및 실습
 공간정보 거점대학 - OpenLayers의 고급 기능 이해 및 실습 공간정보 거점대학 - OpenLayers의 고급 기능 이해 및 실습
공간정보 거점대학 - OpenLayers의 고급 기능 이해 및 실습
 
Introduction To PostGIS
Introduction To PostGISIntroduction To PostGIS
Introduction To PostGIS
 
QGIS 활용
QGIS 활용QGIS 활용
QGIS 활용
 
Introduction to D3.js
Introduction to D3.jsIntroduction to D3.js
Introduction to D3.js
 
Raster data in GeoServer and GeoTools: Achievements, issues and future devel...
Raster data in GeoServer and GeoTools:  Achievements, issues and future devel...Raster data in GeoServer and GeoTools:  Achievements, issues and future devel...
Raster data in GeoServer and GeoTools: Achievements, issues and future devel...
 
OpenLayer's basics
OpenLayer's basicsOpenLayer's basics
OpenLayer's basics
 
[공간정보연구원] 1일차 - QGIS 개요 및 기초
[공간정보연구원] 1일차 - QGIS 개요 및 기초[공간정보연구원] 1일차 - QGIS 개요 및 기초
[공간정보연구원] 1일차 - QGIS 개요 및 기초
 
[QGIS] 수치지도를 이용한 DEM 생성과 지형분석
[QGIS] 수치지도를 이용한 DEM 생성과 지형분석[QGIS] 수치지도를 이용한 DEM 생성과 지형분석
[QGIS] 수치지도를 이용한 DEM 생성과 지형분석
 
공간SQL을 이용한 공간자료분석 기초실습
공간SQL을 이용한 공간자료분석 기초실습공간SQL을 이용한 공간자료분석 기초실습
공간SQL을 이용한 공간자료분석 기초실습
 
공간정보아카데미 - 오픈소스GIS 분석가과정 - QGIS 공간분석일반
공간정보아카데미 - 오픈소스GIS 분석가과정 - QGIS 공간분석일반공간정보아카데미 - 오픈소스GIS 분석가과정 - QGIS 공간분석일반
공간정보아카데미 - 오픈소스GIS 분석가과정 - QGIS 공간분석일반
 
야생동물(Brown bear) 행동권 · 서식지 분석하기
야생동물(Brown bear) 행동권 · 서식지 분석하기야생동물(Brown bear) 행동권 · 서식지 분석하기
야생동물(Brown bear) 행동권 · 서식지 분석하기
 
QGIS server: the good, the not-so-good and the ugly
QGIS server: the good, the not-so-good and the uglyQGIS server: the good, the not-so-good and the ugly
QGIS server: the good, the not-so-good and the ugly
 
Raster Data In GeoServer And GeoTools: Achievements, Issues And Future Develo...
Raster Data In GeoServer And GeoTools: Achievements, Issues And Future Develo...Raster Data In GeoServer And GeoTools: Achievements, Issues And Future Develo...
Raster Data In GeoServer And GeoTools: Achievements, Issues And Future Develo...
 
State of OpenGXT: 오픈소스 공간분석엔진
State of OpenGXT: 오픈소스 공간분석엔진State of OpenGXT: 오픈소스 공간분석엔진
State of OpenGXT: 오픈소스 공간분석엔진
 
Serving earth observation data with GeoServer: addressing real world requirem...
Serving earth observation data with GeoServer: addressing real world requirem...Serving earth observation data with GeoServer: addressing real world requirem...
Serving earth observation data with GeoServer: addressing real world requirem...
 
Geo server 성능향상을 위한 튜닝 기법 20111028
Geo server 성능향상을 위한 튜닝 기법 20111028Geo server 성능향상을 위한 튜닝 기법 20111028
Geo server 성능향상을 위한 튜닝 기법 20111028
 
PostGIS and Spatial SQL
PostGIS and Spatial SQLPostGIS and Spatial SQL
PostGIS and Spatial SQL
 
OpenStreetMap 기반의 Mapbox 오픈소스 매핑 서비스
OpenStreetMap 기반의 Mapbox 오픈소스 매핑 서비스OpenStreetMap 기반의 Mapbox 오픈소스 매핑 서비스
OpenStreetMap 기반의 Mapbox 오픈소스 매핑 서비스
 
Spatial Indexing
Spatial IndexingSpatial Indexing
Spatial Indexing
 
선박식별정보를 이용한 어업활동 공간밀도 가시화
선박식별정보를 이용한 어업활동 공간밀도 가시화선박식별정보를 이용한 어업활동 공간밀도 가시화
선박식별정보를 이용한 어업활동 공간밀도 가시화
 

Similar to Map box styles in GeoServer and OpenLayers

OpenGL Shading Language
OpenGL Shading LanguageOpenGL Shading Language
OpenGL Shading Language
Jungsoo Nam
 
Vector tile style editor workshop
Vector tile style editor workshopVector tile style editor workshop
Vector tile style editor workshop
Aileen Buckley
 
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...
Manikanta Kondeti
 
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
Manikanta Kondeti
 
Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...
Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...
Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...
Adam Paxton
 
Automatic Typographic Maps
Automatic Typographic MapsAutomatic Typographic Maps
Automatic Typographic Maps
Niklas Elmqvist
 
Agi08 Jeremy Morley
Agi08 Jeremy MorleyAgi08 Jeremy Morley
Agi08 Jeremy Morley
Jeremy Morley
 
State of GeoServer 2.12
State of GeoServer 2.12State of GeoServer 2.12
State of GeoServer 2.12
GeoSolutions
 
Concepts and Methods of Embedding Statistical Data into Maps
Concepts and Methods of Embedding Statistical Data into MapsConcepts and Methods of Embedding Statistical Data into Maps
Concepts and Methods of Embedding Statistical Data into Maps
Mohammad Liton Hossain
 
Saving Money with Open Source GIS
Saving Money with Open Source GISSaving Money with Open Source GIS
Saving Money with Open Source GIS
bryanluman
 
TileServer-GL: Hosting vector tile maps on your own server (FOSS4G 2016 Bonn)
TileServer-GL: Hosting vector tile maps on your own server (FOSS4G 2016 Bonn)TileServer-GL: Hosting vector tile maps on your own server (FOSS4G 2016 Bonn)
TileServer-GL: Hosting vector tile maps on your own server (FOSS4G 2016 Bonn)
Petr Pridal
 
CAD STANDARDS
CAD STANDARDSCAD STANDARDS
CAD STANDARDS
Balamurugan Subburaj
 
Matplotlib_Complete review_2021_abridged_version
Matplotlib_Complete review_2021_abridged_versionMatplotlib_Complete review_2021_abridged_version
Matplotlib_Complete review_2021_abridged_version
Bhaskar J.Roy
 
Matplotlib Review 2021
Matplotlib Review 2021Matplotlib Review 2021
Matplotlib Review 2021
Bhaskar J.Roy
 
CSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to RespondCSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to Respond
Denise Jacobs
 
1st UIM-GDB - Connections to the Real World
1st UIM-GDB - Connections to the Real World1st UIM-GDB - Connections to the Real World
1st UIM-GDB - Connections to the Real World
Achim Friedland
 
An Introduction to MapBox
An Introduction to MapBoxAn Introduction to MapBox
An Introduction to MapBox
Matt Yeh
 
MapServer Project Status 2013
MapServer Project Status 2013MapServer Project Status 2013
MapServer Project Status 2013
Jeff McKenna
 
LocationTech Tour 2016 - Vectortiles
LocationTech Tour 2016 - Vectortiles LocationTech Tour 2016 - Vectortiles
LocationTech Tour 2016 - Vectortiles
Morgan Thompson
 
Nouveautés de Mapserver 6.2
Nouveautés de Mapserver 6.2Nouveautés de Mapserver 6.2
Nouveautés de Mapserver 6.2
VisionGÉOMATIQUE2012
 

Similar to Map box styles in GeoServer and OpenLayers (20)

OpenGL Shading Language
OpenGL Shading LanguageOpenGL Shading Language
OpenGL Shading Language
 
Vector tile style editor workshop
Vector tile style editor workshopVector tile style editor workshop
Vector tile style editor workshop
 
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...
 
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
 
Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...
Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...
Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...
 
Automatic Typographic Maps
Automatic Typographic MapsAutomatic Typographic Maps
Automatic Typographic Maps
 
Agi08 Jeremy Morley
Agi08 Jeremy MorleyAgi08 Jeremy Morley
Agi08 Jeremy Morley
 
State of GeoServer 2.12
State of GeoServer 2.12State of GeoServer 2.12
State of GeoServer 2.12
 
Concepts and Methods of Embedding Statistical Data into Maps
Concepts and Methods of Embedding Statistical Data into MapsConcepts and Methods of Embedding Statistical Data into Maps
Concepts and Methods of Embedding Statistical Data into Maps
 
Saving Money with Open Source GIS
Saving Money with Open Source GISSaving Money with Open Source GIS
Saving Money with Open Source GIS
 
TileServer-GL: Hosting vector tile maps on your own server (FOSS4G 2016 Bonn)
TileServer-GL: Hosting vector tile maps on your own server (FOSS4G 2016 Bonn)TileServer-GL: Hosting vector tile maps on your own server (FOSS4G 2016 Bonn)
TileServer-GL: Hosting vector tile maps on your own server (FOSS4G 2016 Bonn)
 
CAD STANDARDS
CAD STANDARDSCAD STANDARDS
CAD STANDARDS
 
Matplotlib_Complete review_2021_abridged_version
Matplotlib_Complete review_2021_abridged_versionMatplotlib_Complete review_2021_abridged_version
Matplotlib_Complete review_2021_abridged_version
 
Matplotlib Review 2021
Matplotlib Review 2021Matplotlib Review 2021
Matplotlib Review 2021
 
CSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to RespondCSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to Respond
 
1st UIM-GDB - Connections to the Real World
1st UIM-GDB - Connections to the Real World1st UIM-GDB - Connections to the Real World
1st UIM-GDB - Connections to the Real World
 
An Introduction to MapBox
An Introduction to MapBoxAn Introduction to MapBox
An Introduction to MapBox
 
MapServer Project Status 2013
MapServer Project Status 2013MapServer Project Status 2013
MapServer Project Status 2013
 
LocationTech Tour 2016 - Vectortiles
LocationTech Tour 2016 - Vectortiles LocationTech Tour 2016 - Vectortiles
LocationTech Tour 2016 - Vectortiles
 
Nouveautés de Mapserver 6.2
Nouveautés de Mapserver 6.2Nouveautés de Mapserver 6.2
Nouveautés de Mapserver 6.2
 

More from Jody Garnett

GeoServer Orientation
GeoServer OrientationGeoServer Orientation
GeoServer Orientation
Jody Garnett
 
Open Source Practice and Passion at OSGeo
Open Source Practice and Passion at OSGeoOpen Source Practice and Passion at OSGeo
Open Source Practice and Passion at OSGeo
Jody Garnett
 
Introduction to OSGeo
Introduction to OSGeoIntroduction to OSGeo
Introduction to OSGeo
Jody Garnett
 
Open Source Procurement
Open Source ProcurementOpen Source Procurement
Open Source Procurement
Jody Garnett
 
Java Image Processing for Geospatial Community
Java Image Processing for Geospatial CommunityJava Image Processing for Geospatial Community
Java Image Processing for Geospatial Community
Jody Garnett
 
State of JTS 2018
State of JTS 2018State of JTS 2018
State of JTS 2018
Jody Garnett
 
Open Source Practice and Passion at OSGeo
Open Source Practice and Passion at OSGeoOpen Source Practice and Passion at OSGeo
Open Source Practice and Passion at OSGeo
Jody Garnett
 
Open Source is hard, we are here to help!
Open Source is hard, we are here to help!Open Source is hard, we are here to help!
Open Source is hard, we are here to help!
Jody Garnett
 
GeoServer Developers Workshop
GeoServer Developers WorkshopGeoServer Developers Workshop
GeoServer Developers Workshop
Jody Garnett
 
GeoServer Ecosystem 2018
GeoServer Ecosystem 2018GeoServer Ecosystem 2018
GeoServer Ecosystem 2018
Jody Garnett
 
State of GeoServer 2.14
State of GeoServer 2.14State of GeoServer 2.14
State of GeoServer 2.14
Jody Garnett
 
OSGeo AGM 2018
OSGeo AGM 2018OSGeo AGM 2018
OSGeo AGM 2018
Jody Garnett
 
Working with the OSGeo Community
Working with the OSGeo CommunityWorking with the OSGeo Community
Working with the OSGeo Community
Jody Garnett
 
State of GeoServer 2.13
State of GeoServer 2.13State of GeoServer 2.13
State of GeoServer 2.13
Jody Garnett
 
Open Data and Open Software Geospatial Applications
Open Data and Open Software Geospatial ApplicationsOpen Data and Open Software Geospatial Applications
Open Data and Open Software Geospatial Applications
Jody Garnett
 
Quick and easy web maps
Quick and easy web mapsQuick and easy web maps
Quick and easy web maps
Jody Garnett
 
State of GeoGig
State of GeoGigState of GeoGig
State of GeoGig
Jody Garnett
 
State of JTS 2017
State of JTS 2017State of JTS 2017
State of JTS 2017
Jody Garnett
 
OSGeo AGM 2017
OSGeo AGM 2017OSGeo AGM 2017
OSGeo AGM 2017
Jody Garnett
 
Incubation Orientation
Incubation OrientationIncubation Orientation
Incubation Orientation
Jody Garnett
 

More from Jody Garnett (20)

GeoServer Orientation
GeoServer OrientationGeoServer Orientation
GeoServer Orientation
 
Open Source Practice and Passion at OSGeo
Open Source Practice and Passion at OSGeoOpen Source Practice and Passion at OSGeo
Open Source Practice and Passion at OSGeo
 
Introduction to OSGeo
Introduction to OSGeoIntroduction to OSGeo
Introduction to OSGeo
 
Open Source Procurement
Open Source ProcurementOpen Source Procurement
Open Source Procurement
 
Java Image Processing for Geospatial Community
Java Image Processing for Geospatial CommunityJava Image Processing for Geospatial Community
Java Image Processing for Geospatial Community
 
State of JTS 2018
State of JTS 2018State of JTS 2018
State of JTS 2018
 
Open Source Practice and Passion at OSGeo
Open Source Practice and Passion at OSGeoOpen Source Practice and Passion at OSGeo
Open Source Practice and Passion at OSGeo
 
Open Source is hard, we are here to help!
Open Source is hard, we are here to help!Open Source is hard, we are here to help!
Open Source is hard, we are here to help!
 
GeoServer Developers Workshop
GeoServer Developers WorkshopGeoServer Developers Workshop
GeoServer Developers Workshop
 
GeoServer Ecosystem 2018
GeoServer Ecosystem 2018GeoServer Ecosystem 2018
GeoServer Ecosystem 2018
 
State of GeoServer 2.14
State of GeoServer 2.14State of GeoServer 2.14
State of GeoServer 2.14
 
OSGeo AGM 2018
OSGeo AGM 2018OSGeo AGM 2018
OSGeo AGM 2018
 
Working with the OSGeo Community
Working with the OSGeo CommunityWorking with the OSGeo Community
Working with the OSGeo Community
 
State of GeoServer 2.13
State of GeoServer 2.13State of GeoServer 2.13
State of GeoServer 2.13
 
Open Data and Open Software Geospatial Applications
Open Data and Open Software Geospatial ApplicationsOpen Data and Open Software Geospatial Applications
Open Data and Open Software Geospatial Applications
 
Quick and easy web maps
Quick and easy web mapsQuick and easy web maps
Quick and easy web maps
 
State of GeoGig
State of GeoGigState of GeoGig
State of GeoGig
 
State of JTS 2017
State of JTS 2017State of JTS 2017
State of JTS 2017
 
OSGeo AGM 2017
OSGeo AGM 2017OSGeo AGM 2017
OSGeo AGM 2017
 
Incubation Orientation
Incubation OrientationIncubation Orientation
Incubation Orientation
 

Recently uploaded

办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
xjq03c34
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
3a0sd7z3
 
Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?
Paul Walk
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
Tarandeep Singh
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
Donato Onofri
 
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
3a0sd7z3
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
APNIC
 
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
rtunex8r
 
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
thezot
 
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
k4ncd0z
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
APNIC
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
davidjhones387
 

Recently uploaded (12)

办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
 
Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
 
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
 
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
 
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
 
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
 

Map box styles in GeoServer and OpenLayers

  • 1. MapBox Styles in GeoServer and OpenLayers
  • 2. David Vick ● 20 years of experience developing software solutions for the Government. ● 2 years at Boundless and just this year began contributing to Open Source. Who are we? Torben Barsballe ● Software developer at Boundless for the past 2.5 years ● Committer on both GeoServer and GeoTools ● Contributor to OpenLayers ● From Victoria, BC
  • 3. Boundless Spatial is a GIS company focused on open source solutions. Boundless delivers a scalable, open GIS platform that includes Exchange, Suite, Desktop and Connect. For more information, visit boundlessgeo.com Who is Boundless?
  • 4. Outline ● What are MapBox Styles, and how do they make styling easier? ○ Why MapBox Styles matter ○ Capabilities ● MapBox Styles in GeoServer ● MapBox Styles in OpenLayers ● Demo ● Questions
  • 5. What are MapBox Styles?
  • 6. What are MapBox Styles? MapBox Style is a styling language developed by MapBox. ● Open specification ● Written in JSON ● Primarily intended for client side (vector tile) styling
  • 7. The full style specification is available at https://www.mapbox.com/mapbox-gl-js/style-spec Multiple Implementations: ● MapBox GL ● MapBox APIs (macOS, iOS, Android) ● GeoServer ● OpenLayers Open Specification
  • 8. JSON Styling ● Easy to manipulate using standard web tools ● Easy to read and write JSON Styling { "version": 8, "layers": [ { "id": "default_point", "type": "circle", "source": "test-source", "source-layer": "place_label", "layout": { "visibility": "visible" }, "paint": { "circle-color": "#FF0000", "circle-opacity": 1, "circle-radius": 6, "circle-stroke-opacity": 0, } } ] }
  • 9. <?xml version="1.0" encoding="UTF-8"?> <StyledLayerDescriptor version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <NamedLayer> <Name>default_point</Name> <UserStyle> <Title>Default Point</Title> <Abstract>A sample style that draws a point</Abstract> <FeatureTypeStyle> <Rule> <Name>rule1</Name> <Title>Red Square</Title> <Abstract>A 6 pixel circle with a red fill and no stroke</Abstract> <PointSymbolizer> <Graphic> <Mark> <WellKnownName>circle</WellKnownName> <Fill> <CssParameter name="fill">#FF0000</CssParameter> </Fill> </Mark> <Size>6</Size> </Graphic> </PointSymbolizer> </Rule> </FeatureTypeStyle> </UserStyle> </NamedLayer> </StyledLayerDescriptor> SLD Styling - XML As JSON, MapBox styles are relatively easy to read and write when compared with other styling languages such as GeoServer's SLD language.
  • 10. Vector tiles ● Like a raster map tile, but comprised of unstyled vector data ● MapBox Vector Tiles use the Google protobuf format ● Supports dynamic, client-side styling Vector Tiles & Client-side styling
  • 11. What Can MapBox Styles Do? Features • Zoom level styling • Data driven styling • Zoom and Data styling • Filtering • Drawing order
  • 12. Root Properties • Version • Name • Sprite • Glyph • Sources • Layers MapBox Styles - Root Properties { "version": 8, "name": "Mapbox Streets", "sprite": "mapbox://sprites/mapbox/streets-v8", "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf", "sources": {...}, "layers": [...] }
  • 13. MapBox Styles - Sources ● Vector ● GeoJSON ● Raster ● Image ● Video ● Canvas
  • 14. MapBox Styles - Layers A Style’s layers property list all of the layers available in that style. The type of layer is specified by the type property. • Background • Fill • Line • Symbol • Raster • Circle • Fill Extrusion "layers": [ { "id": "water", "source": "mapbox-streets", "source-layer": "water", "type": "fill", "paint": { "fill-color": "#00ffff" } } ]
  • 15. Data-driven Styling MapBox Styles support the concept of Data-Driven Styling through the use of Property Functions. Constant: Property Function: { “Circle-color”: { “Property”: “temperature”, “Stops”: [ [0, ‘blue’], [100, ‘red’] ] } } { “Circle-color”: “blue” }
  • 16. Functions and Zoom Zoom-and-property functions allow the appearance of a map feature to change with both its properties and zoom. Each stop is an array with two elements, the first is an object with a property input value and a zoom, and the second is a function output value. { "circle-radius": { "property": "rating", "stops": [ // zoom is 0 and "rating" is 0 -> circle radius will be 0px [{zoom: 0, value: 0}, 0], // zoom is 0 and "rating" is 5 -> circle radius will be 5px [{zoom: 0, value: 5}, 5], // zoom is 20 and "rating" is 0 -> circle radius will be 0px [{zoom: 20, value: 0}, 0], // zoom is 20 and "rating" is 5 -> circle radius will be 20px [{zoom: 20, value: 5}, 20] ] } }
  • 18. Supported / Unsupported MapBox properties Implemented in GeoTools as a module consumed by GeoServer Implemented properties • Sources • GeoServer does not use the Sources property in the style document at this time. The style is applied to whichever GeoServer layer the user selects. • Supported Layer Types • [Background, Fill, Line, Symbol, Raster, Circle, Fill-Extrusion] • Supported Data Types • [Color, Enum, String, Boolean, Number, Array, Function, Filter] • Layer Properties Not Supported • *-translate-anchor, icon-rotation-alignment, icon-pitch-alignment GeoServer MapBox Style Specification
  • 19. Why is this cool? • We are able to read the MapBox style specification and translate that into SLD enabling the user to use JSON while still creating OGC compliant styles. • Able to extend SLD with geometry transformations. • We are adding to the GeoTools code base by adding capabilities for several new functions such as exponential functions and Hue Rotation.
  • 20. MapBox Styles in OpenLayers
  • 21. ol-mapbox-style plugin: ● Constructs an OpenLayers app from a MapBox style ● Can display local or remote styles ol-mapbox-style
  • 22. Installing ol-mapbox-style npm install ol-mapbox-style OR https://github.com/boundlessgeo/ol-mapbox-style
  • 23. Can create an OpenLayers application in one line of javascript: Using ol-mapbox-style 'map' - an element in the HTML document 'data/boston.json' - URL to a MapBox style
  • 24. Rendering a map Data from BostonOpenData (PDDL 1.0)
  • 25. Supported Features Current Features ● Vector, GeoJSON, and Raster sources ● Background, Circle, Line, Fill, and Symbol layers ○ All features not yet implemented ○ Only supports system fonts ○ Most alignment/placement features not supported ○ Data-driven styling is supported Upcoming features: ● Improved labeling for vector tiles
  • 26. Demo
  • 27. ● Prerequisites ● Creating a MapBox Style in GeoServer ● Exposing Vector Tiles using GeoWebCache ● Using a MapBox Style with Vector Tiles in OpenLayers Demo
  • 28. Prerequisites GeoServer ● Version 2.11.1 or newer ● MapBox Style community module ● Vector Tiles community module OpenLayers ● Latest release (v4.3.1) ● ol-mapbox-style plugin (v2.6.1)
  • 29. Creating a Style in GeoServer Data from BostonOpenData (PDDL 1.0)
  • 30. Publishing Vector Tiles in GeoWebCache
  • 31. Displaying as a map in OpenLayers demo.js demo.html boston.json
  • 32. Displaying as a map in OpenLayers
  • 33. Displaying as a map in OpenLayers Data from BostonOpenData (PDDL 1.0)
  • 36. Discover, Learn, Collaborate, and Share With GIS Professionals connect.boundlessgeo.com Check out our booth #103