<?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: laharz in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/laharz/m-p/288478#M22346</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the extent of your filled DEM? Are the points located inside the extent of the DEM?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Mar 2018 11:40:58 GMT</pubDate>
    <dc:creator>XanderBakker</dc:creator>
    <dc:date>2018-03-22T11:40:58Z</dc:date>
    <item>
      <title>laharz</title>
      <link>https://community.esri.com/t5/python-questions/laharz/m-p/288470#M22338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wondering if somebody can help me with some errors generated by the LaHarz model.&amp;nbsp; I am trying to run the Laharz Distal Zones standalone python tool.&amp;nbsp; It was created by a USGS developer and it is supposed to work with ArcGIS 10.X.&amp;nbsp; There are four&amp;nbsp;required inputs: 1) filled DEM, 2) text file of volumes (integers), separated&amp;nbsp;by commas 3) a&amp;nbsp;text file of XY coordinates and 4) a string denoting a prefix for output grids.&amp;nbsp; Below is the message in Geoprocessing Results.&amp;nbsp; The full python script will be attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Executing: laharzdistalzones.py C:\Users\cmoser\Downloads\laharz_py_example\mtrain_example fill mtrwest_ C:\Users\cmoser\Downloads\laharz_py_example\mtrain_example\laharz_textfiles\volumesrockfall.txt C:\Users\cmoser\Downloads\laharz_py_example\mtrain_example\point_textfiles_for_ArcMap\points.txt Rock_Avalanche&lt;BR /&gt;Start Time: Wed Mar 21 17:19:08 2018&lt;BR /&gt;Running script laharzdistalzones.py...&lt;BR /&gt;Parsing user inputs:&lt;BR /&gt;Running Laharz_py&lt;BR /&gt;_________ Input Values _________&lt;BR /&gt;Input Surface Raster Is:fill&lt;BR /&gt;Volume textfile :C:\Users\cmoser\Downloads\laharz_py_example\mtrain_example\laharz_textfiles\volumesrockfall.txt&lt;BR /&gt;Starting coordinates file :C:\Users\cmoser\Downloads\laharz_py_example\mtrain_example\point_textfiles_for_ArcMap\points.txt&lt;BR /&gt;Drainage identifier :mtrwest_&lt;BR /&gt;Rock Avalanche Selected&lt;BR /&gt;_________ Paths on Disk _________&lt;BR /&gt;full path fill :C:\Users\cmoser\Downloads\laharz_py_example\mtrain_example\fill&lt;BR /&gt;full path dir :C:\Users\cmoser\Downloads\laharz_py_example\mtrain_example\dir&lt;BR /&gt;full path flac :C:\Users\cmoser\Downloads\laharz_py_example\mtrain_example\flac&lt;BR /&gt;full path str :C:\Users\cmoser\Downloads\laharz_py_example\mtrain_example\str&lt;BR /&gt;_________ Creating DEM Array _________&lt;BR /&gt;_________ Get NumPyArray Dimensions _________&lt;BR /&gt;Shape is: (986, 1251) (rows, colums)&lt;BR /&gt;Number of rows is: 986&lt;BR /&gt;Number of columns is: 1251&lt;BR /&gt;_________ Set Window Boundaries _________&lt;BR /&gt;wXmin (TOP): 0&lt;BR /&gt;wXmax (BOTTOM): 985&lt;BR /&gt;wYmin (LEFT): 0&lt;BR /&gt;wYmax (RIGHT): 1250&lt;BR /&gt;_________ Convert Textfiles to Arrays _________&lt;BR /&gt;Volume List is: [1000.0, 3000.0, 10000.0, 300000.0]&lt;BR /&gt;Points entered: [[587737.0, 5204869.0], [579305.0, 5196801.0], [577930.0, 5191581.0]]&lt;BR /&gt;Cross Section Area List is: [20.0, 42.0, 93.0, 896.0]&lt;BR /&gt;Planimetric Area List is: [2000.0, 4160.0, 9283.0, 89628.0]&lt;BR /&gt;_________ Creating startpts_g _________&lt;BR /&gt;&lt;SPAN style="color: #ff6600;"&gt;Failed script laharzdistalzones.py...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff6600;"&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff6600;"&gt;File "D:\Programs\ArcGIS\Desktop10.4\ArcToolbox\Toolboxes\laharz_py_example\laharz_py\distal_inundation.py", line 1621, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff6600;"&gt;main(argv[1], argv[2], argv[3], argv[4], argv[5], argv[6])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff6600;"&gt;File "D:\Programs\ArcGIS\Desktop10.4\ArcToolbox\Toolboxes\laharz_py_example\laharz_py\distal_inundation.py", line 1169, in main&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff6600;"&gt;tmpStartPoints = ExtractByPoints(Input_surface_raster,startCoordsList,"INSIDE")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff6600;"&gt;File "d:\programs\arcgis\desktop10.4\arcpy\arcpy\sa\Functions.py", line 1409, in ExtractByPoints&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff6600;"&gt;extraction_area)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff6600;"&gt;File "d:\programs\arcgis\desktop10.4\arcpy\arcpy\sa\Utils.py", line 53, in swapper&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff6600;"&gt;result = wrapper(*args, **kwargs)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff6600;"&gt;File "d:\programs\arcgis\desktop10.4\arcpy\arcpy\sa\Functions.py", line 1405, in Wrapper&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff6600;"&gt;return _wrapToolRaster(u"ExtractByPoints_sa", unicode(result.getOutput(0)))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff6600;"&gt;AttributeError: 'unicode' object has no attribute 'getOutput'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff6600;"&gt;Failed to execute (laharzdistalzones.py).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff6600;"&gt;Failed &lt;/SPAN&gt;t&lt;SPAN style="color: #ff6600;"&gt;a Wed Mar 21 17:19:09 2018 (Elapsed Time: 1.06 seconds)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2018 21:23:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/laharz/m-p/288470#M22338</guid>
      <dc:creator>charlesmoser</dc:creator>
      <dc:date>2018-03-21T21:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: laharz</title>
      <link>https://community.esri.com/t5/python-questions/laharz/m-p/288471#M22339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just a caution, but file paths like&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;C:\Users\cmoser\Downloads\laharz_py_example\mtrain_example\laharz_textfiles\volumesrockfall.txt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;not raw encoded in scripts ( ie r' .... name .... '&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;r'C:\Users\cmoser\Downloads\laharz_py_example\mtrain_example\laharz_textfiles\volumesrockfall.txt'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;will produce Unicode errors in python 3. &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;Which leads me to begin to think that you might want to change the source and destination locations of files being used by the script. &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2018 21:37:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/laharz/m-p/288471#M22339</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-03-21T21:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: laharz</title>
      <link>https://community.esri.com/t5/python-questions/laharz/m-p/288472#M22340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the comment.&amp;nbsp; After reading your comment, I went ahead and moved the workspace folder to the root directory of my D drive, like in the documentation.&amp;nbsp; Then, I hardcoded the path, using r'path&amp;nbsp;to address the issue you mentioned.&amp;nbsp; Unfortunately, I am still getting the error.&amp;nbsp; The error seems to be associated with the ExtractByPoints geoprocessing tool.&amp;nbsp; I know this can fail if the points in the points text file are too far from streams in the streams grid.&amp;nbsp; However, I just checked that and the points are right on top of the streams.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2018 22:31:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/laharz/m-p/288472#M22340</guid>
      <dc:creator>charlesmoser</dc:creator>
      <dc:date>2018-03-21T22:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: laharz</title>
      <link>https://community.esri.com/t5/python-questions/laharz/m-p/288473#M22341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;same coordinate system of course?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2018 22:49:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/laharz/m-p/288473#M22341</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-03-21T22:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: laharz</title>
      <link>https://community.esri.com/t5/python-questions/laharz/m-p/288474#M22342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes.&amp;nbsp; Same coordinate system.&amp;nbsp; Actually, the data that I am using is USGS' sample data set that comes with the toolbox.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2018 01:54:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/laharz/m-p/288474#M22342</guid>
      <dc:creator>charlesmoser</dc:creator>
      <dc:date>2018-03-22T01:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: laharz</title>
      <link>https://community.esri.com/t5/python-questions/laharz/m-p/288475#M22343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You say it comes in toolbox form, but you are running the script in standalone mode.&amp;nbsp; The first thing to check would be if the tool works in the toolbox first.&amp;nbsp; If it does, then use the toolbox, since there may be script/tool validation going on behind the scenes.&amp;nbsp; Usually when a toolbox is provided there is reasons beyond the 'nice' look and that may be accounting for some of the issues. &amp;nbsp;&lt;/P&gt;&lt;P&gt;So I would give that a try first Charles before proceeding with trying to narrow down why the script itself isn't working (and that Unicode thing still bugs me for some reason)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2018 02:55:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/laharz/m-p/288475#M22343</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-03-22T02:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: laharz</title>
      <link>https://community.esri.com/t5/python-questions/laharz/m-p/288476#M22344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry.&amp;nbsp; I was a bit sloppy with language.&amp;nbsp; I mean stand-alone as in not in field calculator or model-builder.&amp;nbsp; The python&amp;nbsp;script I was running is actually a python tool in a toolbox.&amp;nbsp; I think you are on to something with the Unicode business.&amp;nbsp; Again, I think it is the ExtractByPoints processing tool that is failing.&amp;nbsp; I noticed one of the parameters is the coordinate list.&amp;nbsp; So I printed out the coordinate list.&amp;nbsp; Notice the printed out coordinates in bold.&amp;nbsp; Disregard "startpoint.".&amp;nbsp; Each coordinate pair is followed by NaN NaN.&amp;nbsp; Are those hidden characters that need to be stripped out?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Volume List is: [1000.0, 3000.0, 10000.0, 300000.0]&lt;BR /&gt;Points entered: [[587737.0, 5204869.0], [579305.0, 5196801.0], [577930.0, 5191581.0]]&lt;BR /&gt;Cross Section Area List is: [20.0, 42.0, 93.0, 896.0]&lt;BR /&gt;Planimetric Area List is: [2000.0, 4160.0, 9283.0, 89628.0]&lt;BR /&gt;&lt;STRONG style="color: #000000;"&gt;start point. 587737 5204869 NaN NaN&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="color: #000000;"&gt;start point. 579305 5196801 NaN NaN&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="color: #000000;"&gt;start point. 577930 5191581 NaN NaN&lt;/STRONG&gt;&lt;BR /&gt;Length of list: 3&lt;BR /&gt;_________ Creating startpts_g _________&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;Failed script laharzdistalzones.py...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; File "D:\laharz_py_example\laharz_py\distal_inundation.py", line 1625, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; main(argv[1], argv[2], argv[3], argv[4], argv[5], argv[6])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; File "D:\laharz_py_example\laharz_py\distal_inundation.py", line 1173, in main&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; tmpStartPoints = ExtractByPoints(Input_surface_raster,startCoordsList,"INSIDE")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; File "d:\programs\arcgis\desktop10.4\arcpy\arcpy\sa\Functions.py", line 1409, in ExtractByPoints&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; extraction_area)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; File "d:\programs\arcgis\desktop10.4\arcpy\arcpy\sa\Utils.py", line 53, in swapper&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; result = wrapper(*args, **kwargs)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; File "d:\programs\arcgis\desktop10.4\arcpy\arcpy\sa\Functions.py", line 1405, in Wrapper&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; return _wrapToolRaster(u"ExtractByPoints_sa", unicode(result.getOutput(0)))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;AttributeError: 'unicode' object has no attribute 'getOutput'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Failed to execute (laharzdistalzones.py).&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2018 04:53:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/laharz/m-p/288476#M22344</guid>
      <dc:creator>charlesmoser</dc:creator>
      <dc:date>2018-03-22T04:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: laharz</title>
      <link>https://community.esri.com/t5/python-questions/laharz/m-p/288477#M22345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;NaN means not a number.&amp;nbsp; Every point is represented by X, Y, Z and M... since Z and M aren't included in the point geometry, they are assigned NaN.&lt;/P&gt;&lt;P&gt;I am not sure if your inputs are to be in that form.&amp;nbsp; I would have expected a list as shown in your 'Points entered' line above.ie just the X,Y values in the form shown&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2018 09:36:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/laharz/m-p/288477#M22345</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-03-22T09:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: laharz</title>
      <link>https://community.esri.com/t5/python-questions/laharz/m-p/288478#M22346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the extent of your filled DEM? Are the points located inside the extent of the DEM?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2018 11:40:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/laharz/m-p/288478#M22346</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2018-03-22T11:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: laharz</title>
      <link>https://community.esri.com/t5/python-questions/laharz/m-p/288479#M22347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The points do fall within the extent of the DEM.  Again, the data is actually straight from the creator of the tool as a test set.  I visually inspected the coordinates, and I turned the text file into a shapefile just to verify that the points do intersect with the stream network.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think what I will do is comment out the code that creates the coordinates list from a text file and hard code the coordinates to see what happens.  I will post the results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Incidentally, if anybody is interested, the URL for the reference and a link to the zip file with the tools is here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;https://pubs.er.usgs.gov/publication/ofr20141073&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2018 12:22:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/laharz/m-p/288479#M22347</guid>
      <dc:creator>charlesmoser</dc:creator>
      <dc:date>2018-03-22T12:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: laharz</title>
      <link>https://community.esri.com/t5/python-questions/laharz/m-p/288480#M22348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Eureka!&amp;nbsp; I found it!&amp;nbsp; the problem really was the call to the ExtractByPoints method.&amp;nbsp; I finally decided to paste the ExtractByPoints tool into ModelBuilder, ran my data, then exported the model to Python.&amp;nbsp; I discovered that the call to ExtractByPoints&amp;nbsp;is way different than in the USGS code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the USGS Code:&lt;/P&gt;&lt;P&gt;tmpStartPoints = &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;ExtractByPoints&lt;/STRONG&gt;&lt;/SPAN&gt;(Input_surface_raster,"'587737 5204869';'579305 5196801';'577930 5191581'","INSIDE")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code that works from ModelBuilder:&lt;/P&gt;&lt;P&gt;tmpStartPoints = &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;arcpy.gp.ExtractByPoints_sa&lt;/STRONG&gt;&lt;/SPAN&gt;(Input_surface_raster, "'587737 5204869';'579305 5196801';'577930 5191581'", "INSIDE")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to add, Dan Patterson, who responded earlier, asked about import statements.&amp;nbsp; To be fair to the original author of the code, he did include the import statement,&amp;nbsp;from arcpy.sa import *.&amp;nbsp; So why does the code not work for me unless I spell out the full call to the method?&amp;nbsp; I have no idea if it's a Python version issue.&amp;nbsp; I am using Python 2.7.&amp;nbsp; I should get my coworker to try the tool and see whether or not he gets the same error, using the original code.&amp;nbsp; Maybe there is something screwy with my environment.&amp;nbsp; At any rate, I am very happy that the tool works for me now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to everybody who responded to this post!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2018 01:52:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/laharz/m-p/288480#M22348</guid>
      <dc:creator>charlesmoser</dc:creator>
      <dc:date>2018-03-23T01:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: laharz</title>
      <link>https://community.esri.com/t5/python-questions/laharz/m-p/288481#M22349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;by chance did their script do a&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;from arcpy.sa import *&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2018 02:01:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/laharz/m-p/288481#M22349</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-03-23T02:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: laharz</title>
      <link>https://community.esri.com/t5/python-questions/laharz/m-p/288482#M22350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here are the import statements in the original code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import sys, string, os, arcpy, math, time&lt;/P&gt;&lt;P&gt;from arcpy import env&lt;/P&gt;&lt;P&gt;from arcpy.sa import *&lt;/P&gt;&lt;P&gt;from math import *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the code checks out the Spatial Analyst extension.  I wonder why I had to explicitly state the full object to get the tool to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried it back and forth several times and believe me the tool works like a charm when I state the full object and method, arcpy.gp.ExtractByPoints_sa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have Python 2.7.  I don’t know if that has anything to do with it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2018 02:11:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/laharz/m-p/288482#M22350</guid>
      <dc:creator>charlesmoser</dc:creator>
      <dc:date>2018-03-23T02:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: laharz</title>
      <link>https://community.esri.com/t5/python-questions/laharz/m-p/288483#M22351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This ... f&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;rom arcpy.sa import *&amp;nbsp; ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;should never be done in my opinion, even though the help documentation shows it as correct.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;importing as you did is best, but I am surprised that it failed if you used their import method.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;It might be for that version of arcpy with python 2.7&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2018 03:57:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/laharz/m-p/288483#M22351</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-03-23T03:57:53Z</dc:date>
    </item>
  </channel>
</rss>

