SlideShare a Scribd company logo
A Practical Introduction to
GeoJSON
Valeri Karpov
@code_barbarian
github.com/vkarpov15
What’s This Talk About?
● GeoJSON, or, fun with maps
● What you need to know for building apps
● Using the Mapbox API
● Visualizations using geojson.us
About Me
● Building Node.js apps since 2012
● Lead developer on Mongoose, Node.js+MongoDB ODM
● Blogger, thecodebarbarian.com & masteringjs.io
● Early employee at:
○ LevelUp - Bought by Grubhub for $380M in 2018
○ MongoDB - IPO in 2017
○ Booster Fuels - $88M in funding since 2015
Geospatial Data: What is It?
● Points and shapes on a map (latitude and longitude)
Brief Overview of JSON
● Pronounced “jay-son”: JavaScript Object Notation
● Object = string properties (keys), arbitrary values
● Human readable format
● Almost a subset of JavaScript
GeoJSON Data Types
● Points: where did an Uber customer request pickup?
● Lines: how do you drive from point A to point B?
● Polygons: what are the borders of Colorado?
Point Data Structure
● Type and coords
● [lng, lat]
● Longitude first
Geocoding: A Use Case for Points
● Convert text “429 lenox ave miami” ⇒ GeoJSON point
● Usually via API, like Google Maps or Mapbox
Line Data Structure
● Type and coords
● Coords is array
of arrays
● Longitude first
Lines for Driving Directions
● How to drive from WeWork to MIA Airport?
Polygon Data Structure
● Type and coords
● Coords is a
triple nested
array
Multi Polygons
● Polygon coords are triple nested because you can have
multiple polygons in 1!
Polygons and Geofencing
● Polygons help apps be relevant for locations
● Push notifications, special pricing
● How does Uber know you’re in an airport?
Checking if a Point is in a Polygon
● Common polygon use case: check if user is in a polygon
Using Turf.js
● Turf.js provides numerous geospatial helpers
Geospatial Queries with MongoDB
● MongoDB has excellent support for GeoJSON built in
● `$geoIntersects` finds polygons that contain a point
My Current Work
● Booster does gas delivery
● Trucks with certain fueling capacity
● Customers with projected demand
● What’s the most efficient route?
Routing System Components
● Routing between 2 customers: how long does it take to
get from Santa Monica to Dana Point?
● Customers are represented by GeoJSON polygons, so
our driver app provides location-aware information
● Vehicle Routing Problem solver that optimizes routes
● Forecasting demand based on historical data
Moving On
● GeoJSON is a huge part of modern apps
● Points, LineStrings, Polygons get you most of the way
● Points represent individual locations
● Lines represent routes
● Polygons represent areas (states, airports, etc.)
Further Reading
● GeoJSON intro on my blog: bit.ly/geojson-node
● MongoDB geo queries: bit.ly/mongodb-geo
● Mongoose GeoJSON docs: bit.ly/mongoose-geo

More Related Content

PDF
Building a GIS SaaS App using MongoDB
ODP
Actions on google
PDF
Location-Based Services on Android
PPTX
Our Experience on Google Map Integration with Apps
PPTX
PDF
зиновьев алексей Droid con(16_9) android geo apps_ in soviet russia latitude ...
PDF
Android Geo Apps in Soviet Russia: Latitude and longitude find you
PDF
Ben Dowling - Geomium - Building a Geo App - Geomob Feb 2011
Building a GIS SaaS App using MongoDB
Actions on google
Location-Based Services on Android
Our Experience on Google Map Integration with Apps
зиновьев алексей Droid con(16_9) android geo apps_ in soviet russia latitude ...
Android Geo Apps in Soviet Russia: Latitude and longitude find you
Ben Dowling - Geomium - Building a Geo App - Geomob Feb 2011

Similar to A Practical Introduction to GeoJSON (20)

PDF
Services, Data and Architectures for Building a Geo App
PDF
DIGITAL ADDRESSING CODES FOR LOCATION BASED SYSTEMS
PPTX
ExactTarget - Node On The Road
PDF
What I’ve learned from building an app with OSM technologies
PDF
Node.js at Uber
PPTX
The State of Mobile 2017
PPTX
Business Track: Building a Personalized Mobile App Experience Using MongoDB a...
PDF
Pre-Aggregated Analytics And Social Feeds Using MongoDB
PPTX
Corinne Hutchinson's 7/8/2015 PuPPy Presentation on GeoDjango
PDF
GeoNode intro and demo
PDF
Google App Engine Overview and Update
PDF
Haystack- Learning to rank in an hourly job market
PPTX
Offline maps for mobile developers (Android/iOS)
PPTX
The essentials for life at cogs
PPTX
Recent Market Trends in software development
PPTX
Apps & web solutions with OpenSource - Mani Singh - IMIA Asia Pacific Conference
PPTX
A brief description about Angular
PDF
MongoDB Days Silicon Valley: Winning the Dreamforce Hackathon with MongoDB
PPTX
A novel approach to big data veracity using crowd-sourcing techniques
PPTX
Smartphone Behavior On A Featurephone Budget
Services, Data and Architectures for Building a Geo App
DIGITAL ADDRESSING CODES FOR LOCATION BASED SYSTEMS
ExactTarget - Node On The Road
What I’ve learned from building an app with OSM technologies
Node.js at Uber
The State of Mobile 2017
Business Track: Building a Personalized Mobile App Experience Using MongoDB a...
Pre-Aggregated Analytics And Social Feeds Using MongoDB
Corinne Hutchinson's 7/8/2015 PuPPy Presentation on GeoDjango
GeoNode intro and demo
Google App Engine Overview and Update
Haystack- Learning to rank in an hourly job market
Offline maps for mobile developers (Android/iOS)
The essentials for life at cogs
Recent Market Trends in software development
Apps & web solutions with OpenSource - Mani Singh - IMIA Asia Pacific Conference
A brief description about Angular
MongoDB Days Silicon Valley: Winning the Dreamforce Hackathon with MongoDB
A novel approach to big data veracity using crowd-sourcing techniques
Smartphone Behavior On A Featurephone Budget
Ad

More from Valeri Karpov (20)

PDF
A Practical Introduction to Functions-as-a-Service
PDF
A Gentle Introduction to Functions-as-a-Service
PDF
Introducing Async/Await
PDF
TAO and the Essence of Modern JavaScript
PDF
Mastering Async/Await in JavaScript
PDF
React, Redux, and Archetype
PDF
TDD a REST API With Node.js and MongoDB
PDF
Conquering AngularJS Limitations
PDF
MongoDB MEAN Stack Webinar October 7, 2015
PDF
MEAN Stack NYC Meetup 20150717: TDD Your AngularJS + Ionic Directives With jQ...
PDF
Lessons in Open Source from the MongooseJS ODM
PDF
Nimrod: MongoDB Shell in NodeJS (JSConfUY 2015)
PDF
MongoDB Miami Meetup 1/26/15: Introduction to WiredTiger
PDF
MongoDB API Talk @ HackPrinceton
PDF
MEAN Stack WeNode Barcelona Workshop
PDF
MongoDB Israel June Meetup
PDF
JS-IL: Getting MEAN in 1 Hour
PDF
JS-IL Keynote: MongoDB 2.6, Mongoose 4.0, and Beyond
PDF
MEAN Stack Workshop at Node Philly, 4/9/14
PDF
MongoDB: Queries and Aggregation Framework with NBA Game Data
A Practical Introduction to Functions-as-a-Service
A Gentle Introduction to Functions-as-a-Service
Introducing Async/Await
TAO and the Essence of Modern JavaScript
Mastering Async/Await in JavaScript
React, Redux, and Archetype
TDD a REST API With Node.js and MongoDB
Conquering AngularJS Limitations
MongoDB MEAN Stack Webinar October 7, 2015
MEAN Stack NYC Meetup 20150717: TDD Your AngularJS + Ionic Directives With jQ...
Lessons in Open Source from the MongooseJS ODM
Nimrod: MongoDB Shell in NodeJS (JSConfUY 2015)
MongoDB Miami Meetup 1/26/15: Introduction to WiredTiger
MongoDB API Talk @ HackPrinceton
MEAN Stack WeNode Barcelona Workshop
MongoDB Israel June Meetup
JS-IL: Getting MEAN in 1 Hour
JS-IL Keynote: MongoDB 2.6, Mongoose 4.0, and Beyond
MEAN Stack Workshop at Node Philly, 4/9/14
MongoDB: Queries and Aggregation Framework with NBA Game Data
Ad

Recently uploaded (20)

PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Electronic commerce courselecture one. Pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Cloud computing and distributed systems.
PPTX
Spectroscopy.pptx food analysis technology
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Big Data Technologies - Introduction.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
Per capita expenditure prediction using model stacking based on satellite ima...
Network Security Unit 5.pdf for BCA BBA.
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
sap open course for s4hana steps from ECC to s4
Building Integrated photovoltaic BIPV_UPV.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Electronic commerce courselecture one. Pdf
20250228 LYD VKU AI Blended-Learning.pptx
MYSQL Presentation for SQL database connectivity
Mobile App Security Testing_ A Comprehensive Guide.pdf
Cloud computing and distributed systems.
Spectroscopy.pptx food analysis technology
“AI and Expert System Decision Support & Business Intelligence Systems”
Big Data Technologies - Introduction.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Spectral efficient network and resource selection model in 5G networks

A Practical Introduction to GeoJSON

  • 1. A Practical Introduction to GeoJSON Valeri Karpov @code_barbarian github.com/vkarpov15
  • 2. What’s This Talk About? ● GeoJSON, or, fun with maps ● What you need to know for building apps ● Using the Mapbox API ● Visualizations using geojson.us
  • 3. About Me ● Building Node.js apps since 2012 ● Lead developer on Mongoose, Node.js+MongoDB ODM ● Blogger, thecodebarbarian.com & masteringjs.io ● Early employee at: ○ LevelUp - Bought by Grubhub for $380M in 2018 ○ MongoDB - IPO in 2017 ○ Booster Fuels - $88M in funding since 2015
  • 4. Geospatial Data: What is It? ● Points and shapes on a map (latitude and longitude)
  • 5. Brief Overview of JSON ● Pronounced “jay-son”: JavaScript Object Notation ● Object = string properties (keys), arbitrary values ● Human readable format ● Almost a subset of JavaScript
  • 6. GeoJSON Data Types ● Points: where did an Uber customer request pickup? ● Lines: how do you drive from point A to point B? ● Polygons: what are the borders of Colorado?
  • 7. Point Data Structure ● Type and coords ● [lng, lat] ● Longitude first
  • 8. Geocoding: A Use Case for Points ● Convert text “429 lenox ave miami” ⇒ GeoJSON point ● Usually via API, like Google Maps or Mapbox
  • 9. Line Data Structure ● Type and coords ● Coords is array of arrays ● Longitude first
  • 10. Lines for Driving Directions ● How to drive from WeWork to MIA Airport?
  • 11. Polygon Data Structure ● Type and coords ● Coords is a triple nested array
  • 12. Multi Polygons ● Polygon coords are triple nested because you can have multiple polygons in 1!
  • 13. Polygons and Geofencing ● Polygons help apps be relevant for locations ● Push notifications, special pricing ● How does Uber know you’re in an airport?
  • 14. Checking if a Point is in a Polygon ● Common polygon use case: check if user is in a polygon
  • 15. Using Turf.js ● Turf.js provides numerous geospatial helpers
  • 16. Geospatial Queries with MongoDB ● MongoDB has excellent support for GeoJSON built in ● `$geoIntersects` finds polygons that contain a point
  • 17. My Current Work ● Booster does gas delivery ● Trucks with certain fueling capacity ● Customers with projected demand ● What’s the most efficient route?
  • 18. Routing System Components ● Routing between 2 customers: how long does it take to get from Santa Monica to Dana Point? ● Customers are represented by GeoJSON polygons, so our driver app provides location-aware information ● Vehicle Routing Problem solver that optimizes routes ● Forecasting demand based on historical data
  • 19. Moving On ● GeoJSON is a huge part of modern apps ● Points, LineStrings, Polygons get you most of the way ● Points represent individual locations ● Lines represent routes ● Polygons represent areas (states, airports, etc.)
  • 20. Further Reading ● GeoJSON intro on my blog: bit.ly/geojson-node ● MongoDB geo queries: bit.ly/mongodb-geo ● Mongoose GeoJSON docs: bit.ly/mongoose-geo