+ All Categories
Home > Documents > 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization...

3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization...

Date post: 26-Sep-2020
Category:
Upload: others
View: 24 times
Download: 0 times
Share this document with a friend
55
3D Visualization with the ArcGIS API for JavaScript Kristian Ekenes, Jeremy Bartley, Johannes Schmid
Transcript
Page 1: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

3D Visualization with the

ArcGIS API for JavaScriptKristian Ekenes, Jeremy Bartley, Johannes Schmid

Page 2: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

ConsistencyPrinciples of 2D viz ≈ 3D viz

• Code is similar

• Cartographic principles/techniques are similar

Page 3: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Overview

• What you can visualize in 3D

• How to do it

• Considerations and pitfalls

Page 4: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Overview

• What you can visualize in 3D

• How to do it

• Considerations and pitfalls

Page 5: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

What can we visualize?

• Location

• Types

• Data (numbers)

• Combinations of the above

Page 6: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

LocationAll features in a layer have same symbol

Page 7: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

TypesBased on unique (usually text) values

Interstates, highways, major roads, … Residential, commercial, mixed, …

Page 8: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

NumbersBased on field values or functions

• Color

• Size/Extrusion

• Opacity

Page 9: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Multivariate vizBased two or more field values

• Color + Opacity

• Color + Size

• Size + Opacity

• Size + Size • (Height + width)

Page 10: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Hybrid thematic maps• Size and shape based on real-world measurements

• Color or opacity driven by thematic data

Simplifies or

removes the need for a legend!

Page 11: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Subsurface mapping• Features with

negative z values

• Negative

extrusions

• Only in local

scenes

Page 12: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Overview

• What you can visualize in 3D

• How to do it

• Considerations and pitfalls

Page 13: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

2D visualization vs. 3D visualization

2D symbol

Renderer Renderer

2D symbol2D symbol Symbol Layer

3D symbol

Visual VariablesVisual Variables

Visual Variables

Visual VariablesVisual Variables

Visual Variables

Page 14: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Symbols

Page 15: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

2D Symbols• All 2D symbols (except PictureFillSymbol) are supported in

3D

Not recommended!

Page 16: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

3D Symbols

PointSymbol3D

based on geometry type

LabelSymbol3D

LineSymbol3D MeshSymbol3DPolygonSymbol3D

Points Lines Polygons Mesh

Page 17: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

3D Symbol Layers

Flat Volumetric

Each symbol must be composed of one or more symbol layers

Page 18: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Flat Symbol Layers

• Occupy screen space

• Size is expressed in screen

units

- pixels or points

IconSymbol3DLayer

LineSymbol3DLayer

FillSymbol3DLayer

Page 19: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Volumetric Symbol Layers

• Occupy space in virtual

world

• Size is expressed in meters

• Object symbol layers (point

features) have an axis to

size height, width, and depth

ObjectSymbol3DLayer

PathSymbol3DLayer

ExtrudeSymbol3DLayer

Page 20: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

2D visualization vs. 3D visualization

2D symbol

Renderer Renderer

2D symbol2D symbol Symbol Layer

3D symbol

Visual VariablesVisual Variables

Visual Variables

Visual VariablesVisual Variables

Visual Variables

Page 21: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

PointSymbol3DOnly for point features

IconSymbol3DLayer ObjectSymbol3DLayer

Flat (size in points/pixels) Volumetric (width, height, depth in meters)

Page 22: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

PointSymbol3D

cone sphere

tetrahedron cylinder

diamond cube

ObjectSymbol3DLayer – resource types

Page 23: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

PointSymbol3DObjectSymbol3DLayer – web styles

• Street assets

• Vehicles

• Vegetation

• …

Page 24: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

PointSymbol3DObjectSymbol3DLayer – web styles

• WebStyleSymbol

• https://developers.arcgis.com/javascript/latest/guide/visualizing-points-3d/index.html

• https://developers.arcgis.com/javascript/latest/guide/esri-web-style-symbols/index.html

Page 25: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

PointSymbol3D

circle square

kite cross

x

IconSymbol3DLayer – resource types

Page 26: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Keep in mind…

Sample comparison: When is each appropriate?

Page 27: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

LineSymbol3DOnly for polyline features

LineSymbol3DLayer PathSymbol3DLayer

Flat (size in points/pixels) Volumetric (size in meters)

Page 28: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

PolygonSymbol3DOnly for polygon features

FillSymbol3DLayer ExtrudeSymbol3DLayer

Flat (no size) Volumetric (size in meters)

Page 29: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

PolygonSymbol3DAlso supports other symbol layers

IconSymbol3DLayer ObjectSymbol3DLayer

LineSymbol3DLayer

Page 30: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

MeshSymbol3DOnly for mesh features (in SceneLayers)

FillSymbol3DLayer

Page 31: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Renderers

Page 32: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

RenderersSimpleRenderer

UniqueValueRenderer

ClassBreaksRenderer

Page 33: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

2D visualization vs. 3D visualization

2D symbol

Renderer Renderer

2D symbol2D symbol Symbol Layer

3D symbol

Visual VariablesVisual Variables

Visual Variables

Visual VariablesVisual Variables

Visual Variables

Page 34: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

SimpleRenderer

Page 35: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

UniqueValueRenderer

Buildings with real-world height

Page 36: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Buildings with

real-world height

Page 37: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

ClassBreaksRenderer

Page 38: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

• A property of the renderer

• For numeric data-driven continuous visualizations

Visual Variables

Page 39: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Visual Variables: Color

var colorVV = {

type: “color”,

field: “POP_POVERTY”,

normalizationField: “TOTPOP_CY”,

stops: [

{ value: 0.1, color: “#FFFCD4” },

{ value: 0.3, color: “#350242” }

]

};

Page 40: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Keep in mind…

Direct lighting Shade

Page 41: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Visual Variables: Size

var sizeVV = {

type: “size”,

field: “POP_POVERTY”,

normalizationField: “TOTPOP_CY”,

stops: [

{ value: 0.20, size: “4px” },

{ value: 0.65, size: “60px” }

]

};

Page 42: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Keep in mind…

Flat symbols (pixels or points) Volumetric symbols (meters)

Good for multiple scale levels Good for one or two scale levels

Page 43: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Visual Variables: Size (real-world units)

var heightVV = {

type: “size”,

field: “HEIGHT”,

valueUnit: “feet”,

axis: “height”

// axis is only relevant for

// ObjectSymbol3DLayer

};

var widthVV = {

type: “size”,

axis: “width-and-depth”,

valueUnit: “inches”

};

Page 44: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Visual Variables: Opacity

var opacityVV = {

type: “opacity”,

field: “EDUCBASECY”,

stops: [

{ value: 700, opacity: 0.1 },

{ value: 1500, opacity: 0.9 }

]

};

Page 45: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Keep in mind…Features behind are visible

Features behind are not visible

Opacity tends to look better in

3D space when there are

relatively few features spread out

Page 46: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Rotation

Which direction is this symbol pointing?

Easier to interpret in 2D

where tilt doesn’t interfere

No support for rotation in IconSymbolLayer3D at the moment

Page 47: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Rotation

Object3DSymbolLayer

Page 48: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Advanced cases• Can extend the WebGL engine for complex

use cases

• Experimental, not stable

http://richiecarmichael.github.io/ocean/index.html#

https://jkieboom.github.io/devsummit-palm-springs-

2016/demos/apps/external-renderer/

Page 49: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

3D Smart Mapping

• No need to guess

“good” values.

• Generates visually

appealing defaults to

thematic visualizations

in the Scene View

Page 50: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Point Cloud Layers• No symbols, but renderers

- PointCloudRGBRenderer

- PointCloudStretchRenderer

- PointCloudUniqueValueRenderer

- PointCloudClassBreaksRenderer

Page 51: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Overview

• What you can visualize in 3D

• How to do it

• Considerations and pitfalls

Page 52: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Pitfalls

• Too many variables = confusion

• Be aware of scale (generalize when

you need to)

• SceneLayer vs. FeatureLayer

Page 54: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Please Take Our Survey!

Download the Esri Events app

and go to DevSummit

Select the session you attended

Scroll down to the

“Feedback” section

Complete Answers,

add a Comment,

and Select “Submit”

Page 55: 3D Visualization with the ArcGIS API for JavaScript€¦ · 2D visualization vs. 3D visualization 2D symbol Renderer Renderer 2D symbol 2D symbol Symbol Layer 3D symbol ... •For

Recommended