<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: viewshed calculation using arcpy in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/viewshed-calculation-using-arcpy/m-p/182029#M6115</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Now I know, why it takes so long:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the part:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.Viewshed_3d takes 3 times longer if the number of points increase by the factor 3 going from 10.000 to 700.000 points per points.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;which means:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;700.000 points will take approx. 90 days (given 12sec. per point)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;10.000 points will take approx. 5.5hrs (given 3sec. per point) multiplied by 70 will lead to approx. 16 days for 700.000 points...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so what is the problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;any suggestions?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Apr 2011 18:50:14 GMT</pubDate>
    <dc:creator>RiccardoKlinger1</dc:creator>
    <dc:date>2011-04-05T18:50:14Z</dc:date>
    <item>
      <title>viewshed calculation using arcpy</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/viewshed-calculation-using-arcpy/m-p/182025#M6111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;dear members of this great forum:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to use the following code in python to calculate the viewshed for every point of my point-shapefile separately:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
import arcpy
rows = arcpy.SearchCursor("dem_points")
row = rows.next()
while row:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Viewshed_3d("dem_py.tif",row, str(row.POINTID)+"_view.tif","", "CURVED_EARTH","")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row=rows.next()&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;what is wrong? cannot come to the problem!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;hope to get some help or suggestions,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Apr 2011 12:56:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/viewshed-calculation-using-arcpy/m-p/182025#M6111</guid>
      <dc:creator>RiccardoKlinger1</dc:creator>
      <dc:date>2011-04-01T12:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: viewshed calculation using arcpy</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/viewshed-calculation-using-arcpy/m-p/182026#M6112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try checking out your 3D extension.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
class LicenseError(Exception):
&amp;nbsp;&amp;nbsp;&amp;nbsp; pass

import arcview
import arcpy
from arcpy import env

try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; if arcpy.CheckExtension("3D") == "Available":
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CheckOutExtension("3D")
&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # raise a custom exception
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise LicenseError

&amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;lt;Enter your code here&amp;gt;#

&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CheckInExtension("3D")

except LicenseError:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "3D Analyst license is unavailable"
except:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print arcpy.GetMessages(2)

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:17:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/viewshed-calculation-using-arcpy/m-p/182026#M6112</guid>
      <dc:creator>AndrewChapkowski</dc:creator>
      <dc:date>2021-12-11T09:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: viewshed calculation using arcpy</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/viewshed-calculation-using-arcpy/m-p/182027#M6113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Everything was fine with my license. Yet my path for storing the calculated view sheds was unavailable for ArcGIS...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Everything is fine now,!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Shall I post the correct code-snippet?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2011 10:26:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/viewshed-calculation-using-arcpy/m-p/182027#M6113</guid>
      <dc:creator>RiccardoKlinger1</dc:creator>
      <dc:date>2011-04-05T10:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: viewshed calculation using arcpy</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/viewshed-calculation-using-arcpy/m-p/182028#M6114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;for everyone else, who`s interested:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
rows = arcpy.SearchCursor("observer_points")
row = rows.next()

while row:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.MakeFeatureLayer_management("path_to_file", "one-point-dataset", "ID = " + str(row.ID))
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Viewshed_3d("path_to_file", "one-point-dataset","path_to_view-raster"+str(row.ID)+"_v.tif", "", "CURVED_EARTH", "")
&amp;nbsp;&amp;nbsp;&amp;nbsp; row = rows.next()&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;yet this is about 3secs per point on a thinkpad Core2Duo 2.53Ghz 8GB Ram, Intel SSD&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and about 12secs per point on a pentium quad core 2.4Ghz, 4Gb Ram, 7200RPM Harddrive.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nevertheless it is taking to much time... &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:17:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/viewshed-calculation-using-arcpy/m-p/182028#M6114</guid>
      <dc:creator>RiccardoKlinger1</dc:creator>
      <dc:date>2021-12-11T09:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: viewshed calculation using arcpy</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/viewshed-calculation-using-arcpy/m-p/182029#M6115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Now I know, why it takes so long:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the part:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.Viewshed_3d takes 3 times longer if the number of points increase by the factor 3 going from 10.000 to 700.000 points per points.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;which means:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;700.000 points will take approx. 90 days (given 12sec. per point)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;10.000 points will take approx. 5.5hrs (given 3sec. per point) multiplied by 70 will lead to approx. 16 days for 700.000 points...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so what is the problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;any suggestions?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2011 18:50:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/viewshed-calculation-using-arcpy/m-p/182029#M6115</guid>
      <dc:creator>RiccardoKlinger1</dc:creator>
      <dc:date>2011-04-05T18:50:14Z</dc:date>
    </item>
  </channel>
</rss>

