{"id":70711,"date":"2016-02-01T11:11:21","date_gmt":"2016-02-01T11:11:21","guid":{"rendered":"http:\/\/www.esri.com\/arcgis-blog\/products\/product\/uncategorized\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features\/"},"modified":"2018-03-26T21:07:44","modified_gmt":"2018-03-26T21:07:44","slug":"3d-visualization-using-attributes-to-represent-real-world-sizes-of-features","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/3d-gis\/3d-gis\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features","title":{"rendered":"3D visualization: Using attributes to represent real-world sizes of features"},"author":6561,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[23771],"tags":[25781,23811,24921,27491,29541,24581,26521,29551,24961],"industry":[],"product":[36831,36601],"class_list":["post-70711","blog","type-blog","status-publish","format-standard","hentry","category-3d-gis","tag-3d","tag-3d-visualization","tag-javascript","tag-jsapi4","tag-rendering","tag-smart-mapping","tag-visualization","tag-visualvariables","tag-web-gis","product-js-api-arcgis","product-developers"],"acf":{"short_description":"This is the final post in a three-part series exploring 3D data-driven visualizations in web applications using the ArcGIS API for JavaSc...","flexible_content":[{"acf_fc_layout":"content","content":"<p>This is the final post in a three-part series exploring 3D data-driven visualizations in web applications using the <a href=\"https:\/\/developers.arcgis.com\/javascript\/index.html\">ArcGIS API for JavaScript version 4.0<\/a>.<\/p>\n<p>1. <a href=\"https:\/\/blogs.esri.com\/esri\/arcgis\/2016\/01\/19\/3d-visualization-working-with-icons-lines-and-fill-symbols\/\">Working with icons, lines, and fill symbols<\/a><br \/>\n2. <a href=\"https:\/\/blogs.esri.com\/esri\/arcgis\/2016\/01\/25\/3d-visualization-working-with-objects-paths-and-extrusion\/\">Working with objects, paths, and extrusion<\/a><br \/>\n3. Using attributes to represent real-world sizes of features<\/p>\n<p>In the previous posts I demonstrated using flat <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-symbols-IconSymbol3DLayer.html\">icons<\/a>, <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-symbols-LineSymbol3DLayer.html\">lines<\/a> and <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-symbols-FillSymbol3DLayer.html\">polygons<\/a> versus volumetric <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-symbols-ObjectSymbol3DLayer.html\">objects<\/a>, <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-symbols-PathSymbol3DLayer.html\">paths<\/a>, and <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-symbols-ExtrudeSymbol3DLayer.html\">extrusions<\/a> for thematic visualizations using attributes such as population, party affiliation, and graduation rates in a <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-views-SceneView.html\">SceneView<\/a>. <\/p>\n<p>In this post we\u2019ll discuss how to take advantage of visual variables in 3D to represent features as they appear in the real world. For example, if you have a dataset of pipes, you may have an attribute field that stores the diameter of each feature. Perhaps you have a point dataset of trees with trunk width, height, and canopy sizes as attributes. You can use visual variables to create symbols that represent their actual sizes in the view.<\/p>\n<p>Before taking this approach, keep the following in mind:<\/p>\n<p>1. By default, units in <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-renderers-SimpleRenderer.html#size\">size<\/a> visual variables are expressed in meters when working with volumetric symbol layers.<br \/>\n2. Attribute fields used for mapping real-world sizes must be number fields, not strings.<\/p>\n<p>Next we&#8217;ll work through a few examples involving features of various geometry types.<\/p>\n<h2>Polygons: extruding building footprints<\/h2>\n<p>Suppose you have a polygon dataset of building footprints with an attribute storing each building\u2019s height. You can create a simple 3D representation of the actual height of each building using an <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-symbols-ExtrudeSymbol3DLayer.html\">ExtrudeSymbol3DLayer<\/a> within a <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-symbols-PolygonSymbol3D.html\">PolygonSymbol3D<\/a>.<\/p>\n<p>When visualizing real-world sizes, there is no need to set stops for mapping min\/max values to min\/max sizes. Since the data values represent true sizes, we&#8217;ll directly use them to create the sizes of each of our features. Since the sizes of volumetric symbol layers are defined in meters by default, you must set the <strong>valueUnit<\/strong> property of the <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-renderers-SimpleRenderer.html#size\">size<\/a> visual variable to the units of the data if meters were not used in the original measurement.<\/p>\n<p>In the sample below, we have a dataset of building footprints that contains an <strong>ELEVATION<\/strong> field storing the heights of each building in feet. To set the appropriate sizes of the buildings, we only need to set the field property to the ELEVATION attribute and indicate the unit of measure in the valueUnit field (in this case &#8220;feet&#8221;).<\/p>\n<pre>\n<span style=\"color: #333;font-weight: bold\">var<\/span> renderer = <span style=\"color: #333;font-weight: bold\">new<\/span> SimpleRenderer({\n  symbol: <span style=\"color: #333;font-weight: bold\">new<\/span> PolygonSymbol3D({\n    symbolLayers: [<span style=\"color: #333;font-weight: bold\">new<\/span> ExtrudeSymbol3DLayer()]\n  }),\n  visualVariables: [{\n    type: <span style=\"color: #d14\">\"size\"<\/span>,\n    field: <span style=\"color: #d14\">\"ELEVATION\"<\/span>,  <span style=\"color: #998;font-style: italic\">\/\/ The field storing height values for each building<\/span>\n    valueUnit: <span style=\"color: #d14\">\"feet\"<\/span>  <span style=\"color: #998;font-style: italic\">\/\/ converts and extrudes all data values in feet<\/span>\n  }]\n});\n<\/pre>\n<p><a href=\"http:\/\/ekenes.github.io\/esri-js-samples\/4\/3d-visualization\/rw-buildings-extrusion.html\"><strong>CLICK HERE TO VIEW THE LIVE SAMPLE<\/strong><\/a><br \/>\n<a href=\"http:\/\/ekenes.github.io\/esri-js-samples\/4\/3d-visualization\/rw-buildings-extrusion.html\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2016\/02\/3-buildings.png\" alt=\"\" width=\"975\" height=\"617\" class=\"alignnone size-full wp-image-58858\" \/><\/a><\/p>\n<p>Be aware that the extrusion is calculated from the surface of the terrain. Therefore, the roof of each extrusion won&#8217;t necessarily be horizontal. They may slant or curve depending on the underlying topography. To avoid this, the data must have correct z-values and the layer&#8217;s <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-layers-FeatureLayer.html#elevationInfo\">elevationInfo.mode<\/a> must be set to &#8220;absolute-height&#8221;.<\/p>\n<h2>Lines: Pipe diameter<\/h2>\n<p>The following sample demonstrates how to use <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-symbols-PathSymbol3DLayer.html\">PathSymbol3DLayer<\/a> to visualize 2D line data as 3D tubes. The <strong>Pipe_Diameter<\/strong> field in a service representing water pipelines contains the diameter of each pipe in inches. So we\u2019ll set the <strong>valueUnit<\/strong> property to &#8220;inches&#8221;.<\/p>\n<pre>\n<span style=\"color: #333;font-weight: bold\">var<\/span> renderer = <span style=\"color: #333;font-weight: bold\">new<\/span> SimpleRenderer({\n  symbol: <span style=\"color: #333;font-weight: bold\">new<\/span> LineSymbol3D({\n    symbolLayers: [<span style=\"color: #333;font-weight: bold\">new<\/span> PathSymbol3DLayer({\n      material: { color: <span style=\"color: #d14\">\"blue\"<\/span> }\n    })]\n  }),\n  visualVariables: [{\n    type: <span style=\"color: #d14\">\"size\"<\/span>,\n    field: <span style=\"color: #d14\">\"Pipe_Diameter\"<\/span>,\n    valueUnit: <span style=\"color: #d14\">\"inches\"<\/span>  <span style=\"color: #998;font-style: italic\">\/\/converts and extrudes all data values in inches<\/span>\n  }]\n});\n<\/pre>\n<p>These features don\u2019t appear at their true location underground since they don&#8217;t contain z-values. To make the features easier to view, I gave the layer an offset of 20 meters above the ground using the <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-layers-FeatureLayer.html#elevationInfo\">elevationInfo<\/a> property of the layer.<\/p>\n<p><a href=\"http:\/\/ekenes.github.io\/esri-js-samples\/4\/3d-visualization\/rw-pipes-diameter.html\"><strong>CLICK HERE TO VIEW THE LIVE SAMPLE<\/strong><\/a><br \/>\n<a href=\"http:\/\/ekenes.github.io\/esri-js-samples\/4\/3d-visualization\/rw-pipes-diameter.html\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2016\/02\/3-pipes.png\" alt=\"\" width=\"1077\" height=\"631\" class=\"alignnone size-full wp-image-58859\" \/><\/a><\/p>\n<h2>Points: Trees<\/h2>\n<p>Point data can be more complicated to visualize with real world sizes because they are represented as volumetric objects with various dimensions. An example is visualizing trees from point data. It would appear difficult to do considering each tree has a unique shape based on trunk height, width, and canopy size. However, thanks to the axis property on the <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-renderers-SimpleRenderer.html#size\">size<\/a> visual variable, we can go a long way in representing real world tree size with just a few lines of code. <\/p>\n<p>In the following sample, we use a dataset of trees from Warren Wilson College. The dataset is complete with attributes for tree height, trunk diameter, and canopy diameter. As of the current release of the ArcGIS API for JavaScript (4.0), <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-renderers-SimpleRenderer.html#visualVariables\">visual variables<\/a> are only supported when using one symbol layer per symbol. Support for assigning visual variables to specific symbol layers may be added in a future release of the API. For now, we&#8217;ll symbolize trees with two feature layers &#8211; one for trunks and one for the canopies.<\/p>\n<p>To depict trunks, we&#8217;ll use a cylinder primitive in an <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-symbols-ObjectSymbol3DLayer.html\">ObjectSymbol3DLayer<\/a>. Notice the trunk height is measured in feet, and the trunk diameter is measured in inches.<\/p>\n<pre>\n<span style=\"color: #333;font-weight: bold\">var<\/span> trunkRenderer = <span style=\"color: #333;font-weight: bold\">new<\/span> SimpleRenderer({\n  symbol: <span style=\"color: #333;font-weight: bold\">new<\/span> PointSymbol3D({\n    symbolLayers: [<span style=\"color: #333;font-weight: bold\">new<\/span> ObjectSymbol3DLayer({\n       material: { color: <span style=\"color: #d14\">\"brown\"<\/span> },  <span style=\"color: #998;font-style: italic\">\/\/color the trunk brown<\/span>\n       resource: { primitive: <span style=\"color: #d14\">\"cylinder\"<\/span> }  <span style=\"color: #998;font-style: italic\">\/\/give each the shape of a cylinder<\/span>\n    })]\n  }),\n  visualVariables: [\n   {\n     type: <span style=\"color: #d14\">\"size\"<\/span>,\n     axis: <span style=\"color: #d14\">\"height\"<\/span>,  <span style=\"color: #998;font-style: italic\">\/\/ Set the size on the height axis<\/span>\n     field: <span style=\"color: #d14\">\"Height\"<\/span>,  <span style=\"color: #998;font-style: italic\">\/\/ Tree height in feet<\/span>\n     valueUnit: <span style=\"color: #d14\">\"feet\"<\/span>  <span style=\"color: #998;font-style: italic\">\/\/ converts and visualizes all sizes in feet<\/span>\n   }, {\n     type: <span style=\"color: #d14\">\"size\"<\/span>,\n     axis: <span style=\"color: #d14\">\"width-and-depth\"<\/span>,  <span style=\"color: #998;font-style: italic\">\/\/ set the size on both width and depth axes<\/span>\n     field: <span style=\"color: #d14\">\"DBH1\"<\/span>,  <span style=\"color: #998;font-style: italic\">\/\/ Trunk diameter in inches<\/span>\n     valueUnit: <span style=\"color: #d14\">\"inches\"<\/span>  <span style=\"color: #998;font-style: italic\">\/\/ converts and visualizes all sizes in inches<\/span>\n   }\n  ]\n});\n<\/pre>\n<p>Then we&#8217;ll assign the following renderer to a separate layer pointing to the same point data to visualize the tree canopies. Notice that for canopies we make use of all three axes of the size visual variable with separate attributes on the <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-symbols-ObjectSymbol3DLayer.html\">ObjectSymbol3DLayer<\/a>. I&#8217;m also including a <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-renderers-SimpleRenderer.html#color\">color<\/a> visual variable to visualize the carbon storage of each tree. <\/p>\n<pre>\n<span style=\"color: #333;font-weight: bold\">var<\/span> crownRenderer = <span style=\"color: #333;font-weight: bold\">new<\/span> SimpleRenderer({\n   symbol: <span style=\"color: #333;font-weight: bold\">new<\/span> PointSymbol3D({\n     symbolLayers: [<span style=\"color: #333;font-weight: bold\">new<\/span> ObjectSymbol3DLayer({\n       material: { color: <span style=\"color: #d14\">\"green\"<\/span> },\n       resource: { primitive: <span style=\"color: #d14\">\"sphere\"<\/span> }\n     })]\n   }),\n   visualVariables: [\n     {\n      type: <span style=\"color: #d14\">\"size\"<\/span>,\n      axis: <span style=\"color: #d14\">\"height\"<\/span>, <span style=\"color: #998;font-style: italic\">\/\/ set the crown height on the height axis<\/span>\n      field: <span style=\"color: #d14\">\"Crown_Height\"<\/span>, <span style=\"color: #998;font-style: italic\">\/\/ Crown heights are expressed in feet<\/span>\n      valueUnit: <span style=\"color: #d14\">\"feet\"<\/span> <span style=\"color: #998;font-style: italic\">\/\/ converts and extrudes all data values in feet<\/span>\n    }, {\n      type: <span style=\"color: #d14\">\"size\"<\/span>,\n      axis: <span style=\"color: #d14\">\"width\"<\/span>, <span style=\"color: #998;font-style: italic\">\/\/ set the crown diameter (east to west) to the width axis<\/span>\n      field: <span style=\"color: #d14\">\"Width_EW\"<\/span>, <span style=\"color: #998;font-style: italic\">\/\/ crown diameter (EW) is expressed in feet<\/span>\n      valueUnit: <span style=\"color: #d14\">\"feet\"<\/span> <span style=\"color: #998;font-style: italic\">\/\/ converts and extrudes all data values in feet<\/span>\n    }, {\n      type: <span style=\"color: #d14\">\"size\"<\/span>,\n      axis: <span style=\"color: #d14\">\"depth\"<\/span>, <span style=\"color: #998;font-style: italic\">\/\/ set the crown diameter (north to south) to the depth axis<\/span>\n      field: <span style=\"color: #d14\">\"Width_NS\"<\/span>, <span style=\"color: #998;font-style: italic\">\/\/ crown diameter (NS) is expressed in feet<\/span>\n      valueUnit: <span style=\"color: #d14\">\"feet\"<\/span> <span style=\"color: #998;font-style: italic\">\/\/ converts and extrudes all data values in feet<\/span>\n    }, {\n      type: <span style=\"color: #d14\">\"color\"<\/span>,\n      field: <span style=\"color: #d14\">\"C_Storage\"<\/span>,  <span style=\"color: #998;font-style: italic\">\/\/ Carbon storage<\/span>\n      stops: [\n        { value: <span style=\"color: #008080\">0<\/span>, color: <span style=\"color: #d14\">\"#f7fcb9\"<\/span> },\n        { value: <span style=\"color: #008080\">800<\/span>, color: <span style=\"color: #d14\">\"#31a354\"<\/span> }\n      ]\n    }\n   ]\n});\n<\/pre>\n<p>Since the <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-layers-FeatureLayer.html#elevationInfo\">elevationInfo<\/a> offset only takes numbers and not expressions, we cannot place the crown of each tree exactly where it was measured. For the purposes of this sample, I set a filter on tree height and assigned an offset of 6.5 meters to all tree crowns. This works well for most of the features even though it isn&#8217;t accurate for all trees in the map.<\/p>\n<pre>\nelevationInfo: {\n  mode: <span style=\"color: #d14\">\"relative-to-ground\"<\/span>,\n  offset: <span style=\"color: #008080\">6.5<\/span>\n}\n<\/pre>\n<p><a href=\"http:\/\/ekenes.github.io\/esri-js-samples\/4\/3d-visualization\/rw-trees.html\"><strong>CLICK HERE TO VIEW THE LIVE SAMPLE<\/strong><\/a><br \/>\n<a href=\"http:\/\/ekenes.github.io\/esri-js-samples\/4\/3d-visualization\/rw-trees.html\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2016\/02\/3-trees.png\" alt=\"\" width=\"1177\" height=\"619\" class=\"alignnone size-full wp-image-58860\" \/><\/a><\/p>\n<p>This sample demonstrates that you can use visual variables to render real-world sizes of objects combined with a color ramp to create a hybrid thematic visualization that provides context to how features look in the real world. Again, a future release of the API may allow for creating this application without requiring the use of two separate feature layers.<\/p>\n<h2>Subsurface rendering: Wells and earthquakes<\/h2>\n<p>The <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-views-SceneView.html#viewingMode\">viewingMode<\/a> of a <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-views-SceneView.html\">SceneView<\/a> allows for creating local scenes instead of the default global scene. Local scenes allow for localized subsurface mapping. The following sample comes directly from the <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/index.html\">Samples page<\/a> of the ArcGIS API for JavaScript API reference.<\/p>\n<p><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/scene-local\/index.html\">In this sample<\/a> we have two layers of point data: oil\/gas wells and earthquakes. The goal is to map the location of the epicenter of each earthquake, symbolize its size thematically based on magnitude, and depict the actual depth of nearby oil and gas wells. Because this sample is a little more complex, I&#8217;ll only focus on the rendering of the subsurface features.<\/p>\n<p>Since the earthquake service has z-values, features are automatically placed in their proper location as long as <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-layers-FeatureLayer.html#returnZ\">returnZ<\/a> is set to true on the layer. Now we can use visual variables to alter the size of each sphere based on the magnitude of the quake:<\/p>\n<pre>\n<span style=\"color: #333;font-weight: bold\">var<\/span> quakesRenderer = <span style=\"color: #333;font-weight: bold\">new<\/span> SimpleRenderer({\n  symbol: <span style=\"color: #333;font-weight: bold\">new<\/span> PointSymbol3D({\n    symbolLayers:[<span style=\"color: #333;font-weight: bold\">new<\/span> ObjectSymbol3DLayer({\n      resource:{ primitive: <span style=\"color: #d14\">\"sphere\"<\/span> }\n    })]\n  }),\n  visualVariables: [{\n     type: <span style=\"color: #d14\">\"size\"<\/span>,\n     field: <span style=\"color: #d14\">\"mag\"<\/span>,\n     axis: <span style=\"color: #d14\">\"all\"<\/span>,\n     stops: [\n       { value: <span style=\"color: #008080\">2<\/span>, size: <span style=\"color: #008080\">100<\/span> },\n       { value: <span style=\"color: #008080\">5<\/span>, size: <span style=\"color: #008080\">2000<\/span> }\n     ]\n  }]\n});\n<\/pre>\n<p>Wells are treated a little differently since they can be represented as shafts or vertical lines.  Instead of spheres, we\u2019ll use cylinders to represent them. We\u2019ll add a size visual variable on the height axis and set the min and max sizes to negative values so the cylinders will render underground to the actual depths of each well.<\/p>\n<p>We\u2019ll also set a size visual variable on the width axis to a constant value of 50 meters. I exaggerated this value from the actual width of each well so they will be easily visible in the view.<\/p>\n<pre>\n<span style=\"color: #333;font-weight: bold\">var<\/span> wellsDepthRenderer = <span style=\"color: #333;font-weight: bold\">new<\/span> SimpleRenderer({\n  symbol: <span style=\"color: #333;font-weight: bold\">new<\/span> PointSymbol3D({\n    symbolLayers: [<span style=\"color: #333;font-weight: bold\">new<\/span> ObjectSymbol3DLayer({\n      resource: { primitive: <span style=\"color: #d14\">\"cylinder\"<\/span> },\n      width: <span style=\"color: #008080\">50<\/span>\n    })]\n  }),\n  visualVariables: [{\n    type: <span style=\"color: #d14\">\"size\"<\/span>,\n    field: <span style=\"color: #d14\">\"DEPTH\"<\/span>,  <span style=\"color: #998;font-style: italic\">\/\/ depth measured in feet<\/span>\n    axis: <span style=\"color: #d14\">\"height\"<\/span>,\n    stops: [ <span style=\"color: #998;font-style: italic\">\/\/ negative values ensure the features are rendered underground<\/span>\n      { value: <span style=\"color: #008080\">1<\/span>, size: -<span style=\"color: #008080\">0.3048<\/span> },\n      { value: <span style=\"color: #008080\">10000<\/span>, size: -<span style=\"color: #008080\">3048<\/span> }\n    ]\n  }, {\n    type: <span style=\"color: #d14\">\"size\"<\/span>,\n    axis: <span style=\"color: #d14\">\"width\"<\/span>,\n    useSymbolValue: <span style=\"color: #333;font-weight: 500\">true<\/span>  <span style=\"color: #998;font-style: italic\">\/\/ sets the width to 50m<\/span>\n  }]\n});\n<\/pre>\n<p>When viewing the live sample, you will need to be familiar with <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-views-SceneView.html#navigation\">SceneView mouse navigation<\/a> to view the features under the surface.<\/p>\n<p><a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/scene-local\/live\/index.html\"><strong>CLICK HERE TO VIEW THE LIVE SAMPLE<\/strong><\/a><br \/>\n<a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/sample-code\/scene-local\/live\/index.html\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2016\/02\/3-quakes.gif\" alt=\"\" width=\"480\" height=\"300\" class=\"alignnone size-full wp-image-58861\" \/><\/a><\/p>\n<p>Whether it\u2019s mapping features with their real-world locations and sizes or creating thematic representations of statistical data, using visual variables with 3D symbols in the <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/\">4.0 ArcGIS API for JavaScript<\/a> allows you to easily make impressive 3D visualizations.<\/p>\n<p>Note that using visual variables requires that you know your data, especially when creating thematic visualizations. Smart Mapping will be included in a future 4.x release of the <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/\">the ArcGIS API for JavaScript<\/a>, which will allow you to create exploratory 3D visualizations.<\/p>\n<p>To view all posts related to this series, <a href=\"https:\/\/blogs.esri.com\/esri\/arcgis\/tag\/visualvariables\/\">click here<\/a>.<\/p>\n"}],"authors":[{"ID":6561,"user_firstname":"Kristian","user_lastname":"Ekenes","nickname":"Kristian Ekenes","user_nicename":"kekenes","display_name":"Kristian Ekenes","user_email":"KEkenes@esri.com","user_url":"https:\/\/github.com\/ekenes","user_registered":"2018-03-02 00:18:32","user_description":"Kristian Ekenes is a Principal Product Engineer at Esri specializing in data visualization on the web. He works on the ArcGIS Maps SDK for JavaScript, ArcGIS Arcade, and Map Viewer in ArcGIS Online. Kristian's work focuses on researching and developing new and innovative data visualization capabilities of geospatial data in web maps, Arcade integration in web maps, and applications of generative AI assistants in web maps. Prior to joining Esri, he worked as a GIS Specialist for an environmental consulting company. Kristian has degrees from Brigham Young University and Arizona State University.","user_avatar":"<img data-del=\"avatar\" src='https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ekenes-zurich-213x200.png' class='avatar pp-user-avatar avatar-96 photo ' height='96' width='96'\/>"}]},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>3D visualization: Using attributes to represent real-world sizes of features<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/3d-gis\/3d-gis\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"3D visualization: Using attributes to represent real-world sizes of features\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/3d-gis\/3d-gis\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features\" \/>\n<meta property=\"og:site_name\" content=\"ArcGIS Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/esrigis\/\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-26T21:07:44+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ESRI\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/3d-gis\/3d-gis\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/3d-gis\/3d-gis\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features\"},\"author\":{\"name\":\"Kristian Ekenes\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5469f723fbfb78138efbb1da56e6aa9b\"},\"headline\":\"3D visualization: Using attributes to represent real-world sizes of features\",\"datePublished\":\"2016-02-01T11:11:21+00:00\",\"dateModified\":\"2018-03-26T21:07:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/3d-gis\/3d-gis\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features\"},\"wordCount\":10,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"3D\",\"3D visualization\",\"JavaScript\",\"jsapi4\",\"rendering\",\"smart mapping\",\"Visualization\",\"visualVariables\",\"web GIS\"],\"articleSection\":[\"3D Visualization &amp; Analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/3d-gis\/3d-gis\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/3d-gis\/3d-gis\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/3d-gis\/3d-gis\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features\",\"name\":\"3D visualization: Using attributes to represent real-world sizes of features\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2016-02-01T11:11:21+00:00\",\"dateModified\":\"2018-03-26T21:07:44+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/3d-gis\/3d-gis\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/3d-gis\/3d-gis\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/3d-gis\/3d-gis\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"3D visualization: Using attributes to represent real-world sizes of features\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"name\":\"ArcGIS Blog\",\"description\":\"Get insider info from Esri product teams\",\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\",\"name\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"width\":400,\"height\":400,\"caption\":\"Esri\"},\"image\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/esrigis\/\",\"https:\/\/x.com\/ESRI\",\"https:\/\/www.linkedin.com\/company\/5311\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5469f723fbfb78138efbb1da56e6aa9b\",\"name\":\"Kristian Ekenes\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ekenes-zurich-213x200.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ekenes-zurich-213x200.png\",\"caption\":\"Kristian Ekenes\"},\"description\":\"Kristian Ekenes is a Principal Product Engineer at Esri specializing in data visualization on the web. He works on the ArcGIS Maps SDK for JavaScript, ArcGIS Arcade, and Map Viewer in ArcGIS Online. Kristian's work focuses on researching and developing new and innovative data visualization capabilities of geospatial data in web maps, Arcade integration in web maps, and applications of generative AI assistants in web maps. Prior to joining Esri, he worked as a GIS Specialist for an environmental consulting company. Kristian has degrees from Brigham Young University and Arizona State University.\",\"sameAs\":[\"https:\/\/github.com\/ekenes\",\"https:\/\/www.linkedin.com\/in\/kristian-ekenes\/\",\"https:\/\/x.com\/kekenes\"],\"gender\":\"male\",\"jobTitle\":\"Principal Product Engineer\",\"worksFor\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/author\/kekenes\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"3D visualization: Using attributes to represent real-world sizes of features","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esri.com\/arcgis-blog\/products\/3d-gis\/3d-gis\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features","og_locale":"en_US","og_type":"article","og_title":"3D visualization: Using attributes to represent real-world sizes of features","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/3d-gis\/3d-gis\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2018-03-26T21:07:44+00:00","twitter_card":"summary_large_image","twitter_site":"@ESRI","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/3d-gis\/3d-gis\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/3d-gis\/3d-gis\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features"},"author":{"name":"Kristian Ekenes","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5469f723fbfb78138efbb1da56e6aa9b"},"headline":"3D visualization: Using attributes to represent real-world sizes of features","datePublished":"2016-02-01T11:11:21+00:00","dateModified":"2018-03-26T21:07:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/3d-gis\/3d-gis\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features"},"wordCount":10,"commentCount":0,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["3D","3D visualization","JavaScript","jsapi4","rendering","smart mapping","Visualization","visualVariables","web GIS"],"articleSection":["3D Visualization &amp; Analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/3d-gis\/3d-gis\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/3d-gis\/3d-gis\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/3d-gis\/3d-gis\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features","name":"3D visualization: Using attributes to represent real-world sizes of features","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2016-02-01T11:11:21+00:00","dateModified":"2018-03-26T21:07:44+00:00","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/3d-gis\/3d-gis\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/3d-gis\/3d-gis\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/3d-gis\/3d-gis\/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"3D visualization: Using attributes to represent real-world sizes of features"}]},{"@type":"WebSite","@id":"https:\/\/www.esri.com\/arcgis-blog\/#website","url":"https:\/\/www.esri.com\/arcgis-blog\/","name":"ArcGIS Blog","description":"Get insider info from Esri product teams","publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization","name":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","width":400,"height":400,"caption":"Esri"},"image":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/esrigis\/","https:\/\/x.com\/ESRI","https:\/\/www.linkedin.com\/company\/5311\/"]},{"@type":"Person","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5469f723fbfb78138efbb1da56e6aa9b","name":"Kristian Ekenes","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ekenes-zurich-213x200.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ekenes-zurich-213x200.png","caption":"Kristian Ekenes"},"description":"Kristian Ekenes is a Principal Product Engineer at Esri specializing in data visualization on the web. He works on the ArcGIS Maps SDK for JavaScript, ArcGIS Arcade, and Map Viewer in ArcGIS Online. Kristian's work focuses on researching and developing new and innovative data visualization capabilities of geospatial data in web maps, Arcade integration in web maps, and applications of generative AI assistants in web maps. Prior to joining Esri, he worked as a GIS Specialist for an environmental consulting company. Kristian has degrees from Brigham Young University and Arizona State University.","sameAs":["https:\/\/github.com\/ekenes","https:\/\/www.linkedin.com\/in\/kristian-ekenes\/","https:\/\/x.com\/kekenes"],"gender":"male","jobTitle":"Principal Product Engineer","worksFor":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/author\/kekenes"}]}},"text_date":"February 1, 2016","author_name":"Kristian Ekenes","author_page":"https:\/\/www.esri.com\/arcgis-blog\/author\/kekenes","custom_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/08\/Newsroom-Keyart-Wide-1920-x-1080.jpg","primary_product":"ArcGIS Maps SDK for JavaScript","tag_data":[{"term_id":25781,"name":"3D","slug":"3d","term_group":0,"term_taxonomy_id":25781,"taxonomy":"post_tag","description":"","parent":0,"count":342,"filter":"raw"},{"term_id":23811,"name":"3D visualization","slug":"3d-visualization","term_group":0,"term_taxonomy_id":23811,"taxonomy":"post_tag","description":"","parent":0,"count":46,"filter":"raw"},{"term_id":24921,"name":"JavaScript","slug":"javascript","term_group":0,"term_taxonomy_id":24921,"taxonomy":"post_tag","description":"","parent":0,"count":151,"filter":"raw"},{"term_id":27491,"name":"jsapi4","slug":"jsapi4","term_group":0,"term_taxonomy_id":27491,"taxonomy":"post_tag","description":"","parent":0,"count":111,"filter":"raw"},{"term_id":29541,"name":"rendering","slug":"rendering","term_group":0,"term_taxonomy_id":29541,"taxonomy":"post_tag","description":"","parent":0,"count":17,"filter":"raw"},{"term_id":24581,"name":"smart mapping","slug":"smart-mapping","term_group":0,"term_taxonomy_id":24581,"taxonomy":"post_tag","description":"","parent":0,"count":81,"filter":"raw"},{"term_id":26521,"name":"Visualization","slug":"visualization","term_group":0,"term_taxonomy_id":26521,"taxonomy":"post_tag","description":"","parent":0,"count":45,"filter":"raw"},{"term_id":29551,"name":"visualVariables","slug":"visualvariables","term_group":0,"term_taxonomy_id":29551,"taxonomy":"post_tag","description":"","parent":0,"count":5,"filter":"raw"},{"term_id":24961,"name":"web GIS","slug":"web-gis","term_group":0,"term_taxonomy_id":24961,"taxonomy":"post_tag","description":"","parent":0,"count":19,"filter":"raw"}],"category_data":[{"term_id":23771,"name":"3D Visualization &amp; Analytics","slug":"3d-gis","term_group":0,"term_taxonomy_id":23771,"taxonomy":"category","description":"","parent":0,"count":686,"filter":"raw"}],"product_data":[{"term_id":36831,"name":"ArcGIS Maps SDK for JavaScript","slug":"js-api-arcgis","term_group":0,"term_taxonomy_id":36831,"taxonomy":"product","description":"","parent":36601,"count":361,"filter":"raw"},{"term_id":36601,"name":"Developers","slug":"developers","term_group":0,"term_taxonomy_id":36601,"taxonomy":"product","description":"","parent":0,"count":761,"filter":"raw"}],"primary_product_link":"https:\/\/www.esri.com\/arcgis-blog\/?s=#&products=js-api-arcgis","_links":{"self":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/70711","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/users\/6561"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=70711"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/70711\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=70711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=70711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=70711"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=70711"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=70711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}