1

I am new to raster data. I have a raster tif file with population density value in each grid cell. I am interested in plotting a 3D graph based on raster values in ArcGIS or R. The similar graph is like this:

enter image description here

I have no idea how I can create such kind of graph. Do you have any idea?

  • Do you have access to the 3D Analyst extension? Because I'm pretty sure that would be required to do this. Spatial Analyst may also be needed. I can think of at least one way to recreate this - convert pixels to vector squares with their value as an attribute, then create an extruded surface using the value for height. – Chris W Apr 5 '15 at 2:33
  • hi Chris, thanks for your help. I have 3d analyst and spatial analyst installed.Do you use the function "from raster to polygon" for converting pixels to vector squares? I tried this method, but I got the following error message. Do you have other way to convert raster file to polygons? Thank you so much! Close WindowERROR 000864 Input raster: The input is not within the defined domain. ERROR 000863: Invalid GP data type – angie Apr 5 '15 at 2:38
  • Raster to Polygon might work, though it will create a single polygon for all adjacent cells with the same value. Note that it only works on integer rasters. Your pop density is probably doubles or floats, so you'd have to convert it first (there is an Int tool, you can also use raster calculator to multiply by whatever factor of 10 and then use int). The alternative is create a polygon fishnet identical to your raster with label points, and extract values at points, join points to polygons. That's in an answer around here somewhere but I don't have time to look for it just now. – Chris W Apr 5 '15 at 2:48
2

In R, use hist3d from the rgl package. demo(hist3d) will show you a very low resolution example, commented on here:

http://www2.warwick.ac.uk/fac/sci/moac/people/students/peter_cock/r/3d_bar_chart

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.