This forum is shutting down! Please post new discussions at community.naturalcapitalproject.org

Adapting Scenic Quality to terrestrial scenario

I've received the following error message and am not sure what it means. Do the boundaries of the inputs all have to match? Thank you, Matthew

Initializing...

04/09/2015 12:45:36 root DEBUG PATH: ['C:\\InVEST_3_1_1_x86\\invest-3-x86\\.']

04/09/2015 12:45:36 root DEBUG Loading scenic_quality from PATH

Arguments:

a_coefficient 1.0

aoi_uri C:/Temp/Sonoma/County_shapefiles/County_boundary/SOCO_PRMD_Sonoma_County.shp

b_coefficient 0.0

c_coefficient 0.0

cell_size 500.0

d_coefficient 0.0

dem_uri C:/Temp/Sonoma/DEM_proj1.img

max_valuation_radius 8000.0

pop_uri C:/Temp/Sonoma/Population/pop_proj1.img

refraction 0.13

structure_uri C:/Temp/Sonoma/InVEST_modules/Scenic/randompoints1.shp

valuation_function polynomial: a + bx + cx^2 + dx^3

workspace_dir C:\InVEST_3_1_1_x86\ScenicQuality



04/09/2015 12:45:36 root INFO Logging will be saved to scenic_quality-log-2015-04-09--12_45_36.txt

04/09/2015 12:45:36 root DEBUG Loaded the model from invest_natcap.scenic_quality.scenic_quality

04/09/2015 12:45:36 root INFO Executing the loaded model

04/09/2015 12:45:36 root INFO Running InVEST version "3.1.1"

04/09/2015 12:45:36 root INFO Python architecture: ('32bit', 'WindowsPE')

04/09/2015 12:45:36 root INFO Disk space remaining for workspace: 666.21 MB

04/09/2015 12:45:36 root INFO Pointing temporary directory at the workspace at C:\InVEST_3_1_1_x86\ScenicQuality

04/09/2015 12:45:36 root INFO Updating os.environ["TMP"]=C:\InVEST_3_1_1_x86\ScenicQuality\tmp to C:\InVEST_3_1_1_x86\ScenicQuality

04/09/2015 12:45:36 root INFO Updating os.environ["TEMP"]=C:\InVEST_3_1_1_x86\ScenicQuality\tmp to C:\InVEST_3_1_1_x86\ScenicQuality

04/09/2015 12:45:36 root INFO Updating os.environ["TMPDIR"]=C:\InVEST_3_1_1_x86\ScenicQuality\tmp to C:\InVEST_3_1_1_x86\ScenicQuality

04/09/2015 12:45:36 root INFO Setting tempfile.tempdir to C:\InVEST_3_1_1_x86\ScenicQuality\tmp

04/09/2015 12:45:36 root INFO Starting scenic_quality

04/09/2015 12:45:36 scenic_quality INFO Start Scenic Quality Model

04/09/2015 12:45:36 scenic_quality DEBUG Validating parameters.

04/09/2015 12:45:36 scenic_quality DEBUG DEM cell size: 28.269645

04/09/2015 12:45:36 scenic_quality DEBUG Setting local variables.

04/09/2015 12:45:36 scenic_quality INFO Clipping DEM by AOI.

04/09/2015 12:45:36 scenic_quality DEBUG Projecting AOI for DEM.

04/09/2015 12:45:36 scenic_quality DEBUG Clipping DEM by projected AOI.

04/09/2015 12:45:36 scenic_quality DEBUG DEM: C:/Temp/Sonoma/DEM_proj1.img, AIO: C:\InVEST_3_1_1_x86\ScenicQuality\intermediate\aoi_dem.shp

04/09/2015 12:45:38 scenic_quality INFO Reclassifying DEM to account for water at sea-level and resampling to specified cell size.

04/09/2015 12:45:38 scenic_quality DEBUG Reclassifying DEM so negative values zero and resampling to save on computation.

04/09/2015 12:45:38 geoprocessing WARNING this call is vectorizing which is deprecated and slow

04/09/2015 12:45:38 scenic_quality INFO Calculating viewshed.

Polynomial

Number of viewpoints: 210

feature 0

04/09/2015 12:45:38 root ERROR ---------------------------------------------------

04/09/2015 12:45:38 root ERROR ---------------------- ERROR ----------------------

04/09/2015 12:45:38 root ERROR ---------------------------------------------------

04/09/2015 12:45:38 root ERROR Error: exception found while running scenic_quality

04/09/2015 12:45:38 root DEBUG

04/09/2015 12:45:38 root DEBUG Build details

04/09/2015 12:45:38 root DEBUG Interpreter

04/09/2015 12:45:38 root DEBUG Current temp dir: C:\InVEST_3_1_1_x86\ScenicQuality\tmp

04/09/2015 12:45:38 root DEBUG tempfile.tempdir: C:\InVEST_3_1_1_x86\ScenicQuality\tmp

04/09/2015 12:45:38 root DEBUG

04/09/2015 12:45:38 root DEBUG System

04/09/2015 12:45:38 root DEBUG OS : Windows-7-6.1.7601-SP1

04/09/2015 12:45:38 root DEBUG Processor architecture: AMD64

04/09/2015 12:45:38 root DEBUG FS encoding : mbcs

04/09/2015 12:45:38 root DEBUG

04/09/2015 12:45:38 root DEBUG Python

04/09/2015 12:45:38 root DEBUG Version : 2.7.9

04/09/2015 12:45:38 root DEBUG Build : ('default', 'Dec 10 2014 12:24:55')

04/09/2015 12:45:38 root DEBUG Compiler : MSC v.1500 32 bit (Intel)

04/09/2015 12:45:38 root DEBUG Implementation : CPython

04/09/2015 12:45:38 root DEBUG Architecture : 32bit

04/09/2015 12:45:38 root DEBUG Linkage format : WindowsPE

04/09/2015 12:45:38 root DEBUG

04/09/2015 12:45:38 root DEBUG Packages

04/09/2015 12:45:38 root DEBUG Cython : ?

04/09/2015 12:45:38 root DEBUG Numpy : 1.8.1

04/09/2015 12:45:38 root DEBUG Scipy : 0.15.1

04/09/2015 12:45:38 root DEBUG OSGEO : 1.11.1

04/09/2015 12:45:38 root DEBUG Shapely : 1.5.5

04/09/2015 12:45:38 root DEBUG InVEST : 3.1.1

04/09/2015 12:45:38 root DEBUG

04/09/2015 12:45:38 root DEBUG

04/09/2015 12:45:38 root DEBUG Exception not environment-related

04/09/2015 12:45:38 root DEBUG Printing traceback

Traceback (most recent call last):

File "invest_natcap\iui\executor.pyc", line 553, in runModel

File "invest_natcap\scenic_quality\scenic_quality.pyc", line 536, in execute

File "invest_natcap\scenic_quality\scenic_quality.pyc", line 199, in compute_viewshed_uri

File "invest_natcap\scenic_quality\scenic_quality.pyc", line 356, in compute_viewshed

File "invest_natcap\scenic_quality\scenic_quality_core.pyc", line 1120, in viewshed

File "invest_natcap\scenic_quality\scenic_quality_core.pyc", line 1178, in compute_viewshed

IndexError: index -3623 is out of bounds for axis 0 with size 167

None


04/09/2015 12:45:38 root ERROR Exiting due to failures


Comments

  • NicNic Member, Moderator
    Hi Matthew,

    The error you're having might be due to the viewshed that extends outside of your AOI or outside of your data.Maybe if you try with a larger AOI, the error will disappear. Otherwise, you might have a better luck with a DEM that covers a wider area. If it doesn't work, let me know. I'd be happy to help further.

    We're actually working on a brand new version of the tool that is much faster, and that will be memory efficient. Since it will be released soon, you should inquire about it in the coming weeks.

    Best,
    Nic
  • Thanks for getting back to me Nic. I've tried to run the model a number of times now with different permutations and have been unsuccessful in avoiding the same error. If I may, let me review my inputs: 

    1) for the AOI, I have a shapefile of the outline of the CA county where we are working. 
    2) For "Features Impacting Aesthetic Quality," I have a shapefile of random points that were generated within polygons that represent land trust conservation easement holdings. All of those random points occur within the AOI. 
    3) I have a DEM file which extends far beyond the border of the AOI. 
    4) And finally, I have a population raster which is clipped to the AOI shapefile. 

    From what I've described, do any of these inputs sounds suspect? 

    Could the error be due to processing speed? Should I be concerned by this warning in the log: "WARNING this call is vectorizing which is deprecated and slow". When will the newer module be posted?
  • NicNic Member, Moderator
    Hi Matthew,

    Your inputs look fine. If you don't mind, I'd like to work with you offline to get to the bottom of this, and will post a solution on this thread. You can contact me at my Stanford email address on the people's page on the Natcap webpage. I'm looking forward to talking further about this with you.

    Cheers,
    Nic
  • Was this one solved? I am getting an Index error as well in the Scenic Quality 3.3.1

  • jdouglassjdouglass Administrator, NatCap Staff
    Hi Christina,  It's very likely that this has not been resolved.  We're in the middle of a refactor to the Scenic Quality model that should resolve most issues like this.  We'll have more on this soon.

    In the meantime, if you could share your input data with jdouglass@stanford.edu, I'll take a look and see if there's a workaround until we can release the improved model.

    Thanks, and sorry about the crash!
Sign In or Register to comment.