viewshed analysis

2517
4
04-27-2010 12:12 PM
New Contributor
i've only recently started working with arcgis and was wondering if anyone has a VB code for conducting a viewshed analysis or line of sight? I've tried numerous codes already and none appear to work on a TIN model? Also how does one go about picking the location from where the analysis will be conducted ?

Thanks in advance
Mark
Reply
0 Kudos
4 Replies
New Contributor III
Don't know why noone else has responded. ArcGIS can only use rasters for viewshed. There are lots of articles about using TINs for viewsheds but they are mostly bespoke applications. Do you have spatial analyst or 3D analyst? If not you're in trouble.

I suggest you use a free tool such as microdem - it has a pig of an interface but its viewsheds are very good. GRASS gis also does viewsheds, it's also free, but again it's an absolute pig to use for the first few times. IT's like they've gone out of their way to make it hard for beginners. Think of it as a private members club.

For some reason ArcGIS makes life difficult to configure the viewshed. If it's just a single point you're after (Very common) you have to create a shapefile and then add fields and edit them for the viewshed parameters, the descriptions of which are quite buried in the documentation.

It would be much easier if the tool allowed manual location entry, along with options to adjust the offset parameters without having to add fields. Can that please be fixed?
Reply
0 Kudos
Regular Contributor III
Hi Mark,

JT7747 is correct in that Viewshed is raster-based only.  However, if you want to perform Line of Sight analysis you can use rasters, TIN's, or terrains for your input surface.  The LOS tool requires the 3D Analyst extension. Viewshed is available with both 3D and Spatial Analyst licenses.

Links to review for LOS:
http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=1223&pid=1221&topicname=Line_of_Sight_(3D_Ana...)
http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=How_Line_of_Sight_(3D Analyst)_works

Links to review for Viewshed:
http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=6518&pid=6505&topicname=Viewshed
http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=How_Viewshed_works

The way Viewshed is implemented enables the user to have full control over the visibility analysis down to the observer level.  If the offset fields, azimuth fields, vertical fields, etc... were exposed in the tool interface then they would apply to all points (or lines).  Our implementation allows the user to have varying parameters for each observer which makes the tool quite robust and capable of doing complex viewshed studies.

If you are interested in studying only 1 point, you do have to create a feature class, but you do not have to add all the fields that would be used to control the visibility.  The tool uses the defaults if the fields aren't present.

For example, The AZIMUTH1 and AZIMUTH2 items specify horizontal angle limits to the scan.  Values are given in degrees from 0 to 360, with 0 oriented to north. If the AZIMUTH1 and AZIMUTH2 items do not exist in the feature attribute table, AZIMUTH1 defaults to 0 and AZIMUTH2 defaults to 360, implementing a full 360-degree sweep.

The default behaviors are discussed in the section, How Viewshed Works, which I have linked to above.
Reply
0 Kudos
New Contributor III
Thanks Eric that's helpful. I should have specified that if you want to alter the defaults for a single point viewshed (which is what I use most) then it's a bit of a pain.

The documentation mentions the refractivity coefficient, but maddeningly doesn't give enough information to enable a user to actually use that function. The default value of 0.13 is not explained, and there's no guidance as to where the figure came from, or for what atmospheric conditions it's appropriate for. My guess is that the developers added it without ever thinking that users might want to know how it works and what kind of parameters would be appropriate. Black box GIS at its worst. Give it a few more years and the original developers won't even remember why they implemented it, assuming they still work for ESRI.

There's an interesting article here http://mapaspects.org/content/effects-curvature-earth-refraction-light-air-and-fuzzy-viewsheds-arcgi...

IT would be hugely beneficial to those of us working with long range viewsheds to have the documentation updated to explain the refractivity coefficient. Otherwise this tool's utility is severely limited - how can policy makers justify making decisions based on viewshed analysis when the algorithm isn't properly documented? It leaves any ArcGIS viewshed with refraction correction open to criticism, and at worst, dismissal. And that isn't good science.

If you're able to find the ArcGIS viewshed man and encourage him to tell us what the refraction numbers mean we'd be really really grateful. Thanks
Reply
0 Kudos
New Contributor
sorry if no one responded but me anyway am new too to this infact am using it today for the first time but i think i ran into the same problem you are facing i got a notification about the vb code you are talking about but i just okayed the icon and it let me through i thing you should just click okay on it than trying to logg in a code anyway hope it works for you.
Lila
Reply
0 Kudos