Module 08
Cesium Ion (& Mapbox)
Yesterday at the Mammoth Cave
Webcam
archive
GEO 409: Advanced GIS
Announcements
Open lab during class times next week.
a.k.a Collaboration Week.
Can't make it?
Let's Zoom!
Announcements
Thursday Night Live
music
downtown Lexington.
49th GiB Cartography Award
Dilni's
portfolio
Waverly Hills
pinhole image
and
interior
Examples from you!
Sam P's change
Lillian's change
Hannah's change
Dilni's dream
Kayte's dream
Gianna's dream
Tucker's dream
Connor's dream
Hannah's dream
Sam's dream
Jack's dream
link
Final module of semester
Explores pro mapping platforms
Cesium
Mapbox
in Addendum
Goals
Gain familiarity with the popular uses of the Cesium platform.
Create a final web page.
Strengthen our understanding of how to publish content with HTML.
Final project
Pick an area of interest in Kentucky and map it.
You know how to get detailed data.
Make a Cesium Story map.
Explore two additional ways to visualize data.
Publish it to a new repository. Share it with the world.
Requirements in Mod 08
Cesium ion
Cesium
3D geospatial applications that can ingest many 3D data formats.
One the first open-source virtual globes.
Free 5 GB of hosted 3D data.
cesium.com/ion/signin
Stories from point clouds
Created Cesium ion Stories in 2020 to be the 'PowerPoint for point clouds'
and that's what we are going to make.
First, we need LAS files!
Cesium ion data
Check your lidar folder from the explore-lidar.ipynb Notebook.
Merged LAS from
lidar-merge.ipynb
notebook (modified explore-lidar.ipynb).
Practice with LAS file downloaded in a previous slide.
Upload to
My Assets
in Cesium ion
Open VS Code
Save the Embed code
into the
lesson-map/index.html
file
overwrite the existing code.
#### Find this starting around line 90 ```html
``` ___ #### Replace this with your embed code ```html
``` ___ #### Change `width` attribute to `100%` ```html width="1024" width="100%" ``` ___ ### View in browser * Save `index.html` * Click the **Go Live** button in the lower-right corner.
Tips for final project
In VS Code, edit
lesson-map/index.html
to include maps, content, and reqs from final project.
Copy contents of
lesson-map
folder to new repo.
More tips
Put all files in top-level directory (the root) of the new repo.
EVERYTHING is case-sensitive.
DON'T USE \ backslashes. Use / forward slashes.
Basic HTML
Start with the
basics
in this tutorial.
When you see a tag, e.g.,
<p></p>
look up the
p
tag
here
.
Experiment! Copy! Experiment!
Exploring GitHub
for new templates and inspiration.
Check out
this
and then search for
with this
and finally accept this
lesson invitation
from MAP 673.
GOOD LUCK
STAY POSITIVE
Addendum: Mapbox
Platform?
How do you assemble and publish the map?
Static map?
A non-interactive map image.
Requires good cartographic skills.
Slippy map?
An interactive map that pans and zooms.
Requires coding skills and/or good platform.
MAPBOX
## Mapbox * primo 🍭 slippy map builder/host * recognize our connected devices make us sensors * real-time data-driven location services * [mapbox.com](https://www.mapbox.com/) --- ### Rise of mapping services
It's a good time to be a cartographer! --- ## Map tiles ### Quick history of slippy base maps --- ## mid 2000s # Raster tiles * Rendered on server * Delivered as static image --- ## 2014 # Vector tiles * Rendered in browser * Delivered with geometries and metadata --- ## Zoom levels * 4
zoom level
number of tiles * Zoom level 22 sufficient * 1.76 x 19
13
tiles --- ## Raster v. Vector # Compare * [OSM](https://www.openstreetmap.org/#map=2/37.3/-79.4) * [Mapbox](https://api.mapbox.com/styles/v1/mapbox/streets-v9.html?title=true&access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4M29iazA2Z2gycXA4N2pmbDZmangifQ.-g_vE53SD2WrJ6tFX7QHmA#1.07/0/0) --- ### The winner
--- ## Mapbox uses # OSM Data Consider their license requirement: `© Mapbox © OpenStreetMap Improve this map.` --- ### [mapbox.com/signup](https://www.mapbox.com/signup/) --- ## Terminology * **Dataset** is editable * **Tileset** is symbolized * Tilesets can contain many layers * **Style** is a map --- ### Formats * **Vector**: Shapefile (or GeoJSON which needs to be in EPSG: 4326) * **Raster**: GeoTIFF, EPSG: 3857 --- ## Studio * The Photoshop of online mapping * Rule-based classification and symbology * Change appearance as we zoom --- ## Styles * Aka "the map" * Symbolized tilesets that we can share * Free, curated "Designer" sets! --- ## Their imagery is amazing
Let's Start!
Data?
Usually the most difficult first step.
Either too much (need to clip)
or too little (need to create).
Use the application notebooks to create perfect data.
Vector Data!
Contours from modified
contours.ipynb
notebook
create Shapefile (multi-file format)
and zips them up, ready to upload as a tileset.
Raster Data!
Create square layout in ArcGIS Pro
Add map frame (projected to EPSG 3857)
to fill entire layout.
Export as TIFF with GeoTIFF tags.
Practice data
Use Natural Bridge State Resort Park as example.
Kentucky hillshade
arches and custom symbols
custom elevation contours
LAS file
Let's jump into Mapbox
Instructions
Demo in lesson doc.
Finished?
After designing your style, i.e., map, in Studio
zoom to your area of interest
and re-lock the Settings > Default map position >
Lock
to center your map.
Click Share...
Open VS Code
Save the Style URL
and Access token
into the
lesson-map/map.html
file.
#### Find this starting around line 35 ```js // 💡💡💡 LOOK HERE --------------------------------- // 💡💡💡 Change these variables -------------------- const styleURL = 'mapbox://styles/...' const token = 'pk....' // ------------------------------------------------ ``` ___ #### Add your style & token ```js // 💡💡💡 LOOK HERE --------------------------------- // 💡💡💡 After your change... -------------------- const styleURL = 'mapbox://styles/outragegis/cl26bieiw00a714mwe9oz119j' const token = 'pk.eyJ1Ijoib3V0cmFnZWdpcyIsImEiOisdasdaddsasadqqwe112e12' // ------------------------------------------------ ``` ___ ### View in browser * Save `map.html` * Click the **Go Live** button in the lower-right corner.