EsriOceans / btm

Benthic Terrain Modeler
http://resources.arcgis.com/en/communities/oceans/
Mozilla Public License 2.0
27 stars 7 forks source link

Handle geographic data without requiring reprojection #76

Open scw opened 10 years ago

scw commented 10 years ago

A suggestion from Jeff Jenness:

Make it work correctly with geographic (lat/long) data. I'm actually going to add TPI to my DEM Surface Tools extension (http://www.jennessent.com/arcgis/surface_area.htm), and I will make it work correctly with both projected and geographic data. It is actually not that hard; you just need to build an array (or some other data structure in memory) that holds the north/south, east/west and diagonal cell-to-cell distances for each row in the DEM. Then, when you are calculating the east-west and north-south gradients (i.e. to get slope), you just adjust your calculations using those true cell-to-cell distances. I think I have all this illustrated in the manual for the DEM Surface Tools (at least conceptually; I don't get into coding details in the manual).