Projection in pollination model

Hi all!

I am new using the inVEST pollination model and I want to run it for a big region, Europe. 
Until the moment I run it only for a small region to get my head around on how the model works, and I realized that I can only use UTM projection for the land use raster (I am using Corine land use raster, which is in ETRS_1989_LAEA but didn't work, the model gets stuck).
The problem will come when my raster file will be bigger than only one UTM zone. I read in the user guide that it is only required a projected raster in meters and a define projection but it seems that is not working with LAEA (which is in meters). 

Can you give some advice on which projection I should use or will be better to split the raster by regions? 

Thanks!

Comments

  • RichRich Administrator, NatCap Staff
    Hello, FYI, timely question, we're actively overhauling our pollination model.  If you can wait a little bit, it might be worth using the new one over the old one.  But as for your projection issue, technically you need a projection that's equadistant, but really the flight paths of pollinators don't reach *that* far, so some distortion might be acceptable for your case.  But you say the model gets "stuck".  That sounds like a different issue.  Are you getting an error, or is it just taking a long time?  You might want to look at the pixel dimensions of your landcover raster.  Something less than 10k X 10k isn't too big of a deal, something larger may cause some longer runtimes.

    Hope something is helpful there, please follow up if we can help further.
  • edited May 9
    Hi,
    Thank you so much for your help. I supposed that when I saw the new looking of the instructions on the web. Do you know more or less when the new version will be ready?

    And I get this error: 

    DatasetUnprojected encountered: These datasets are unprojected set ([path\\ intermediate\\ agmap_cur.tiff]) see the log for details:

    Initializing...

    05/10/2017 00:30:44 root DEBUG Loading <module 'natcap.invest.pollination.pollination' from 'D:\InVEST_3.3.3_x86\invest-3-x86\natcap\invest\pollination\pollination.pyc'> in frozen environment

    Arguments:

    ag_classes

    do_valuation False

    guilds_uri D:\InVEST_3.3.3_x86\Pollination\Input\Guild.csv

    landuse_attributes_uri D:/InVEST_3.3.3_x86/Pollination/Data/LULC.csv

    landuse_cur_uri D:/InVEST_3.3.3_x86/Pollination/Data/landusespa/hdr.adf

    results_suffix

    workspace_dir D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2



    05/10/2017 00:30:44 root INFO Logging will be saved to natcap.invest.pollination.pollination-log-2017-05-10--00_30_44.txt

    05/10/2017 00:30:44 root DEBUG Loaded the model from natcap.invest.pollination.pollination

    05/10/2017 00:30:44 root INFO Executing the loaded model

    05/10/2017 00:30:44 root INFO Running InVEST version "3.3.3"

    05/10/2017 00:30:44 root INFO Python architecture: ('32bit', 'WindowsPE')

    05/10/2017 00:30:44 root INFO Disk space remaining for workspace: 450.74 GB

    05/10/2017 00:30:44 root INFO Pointing temporary directory at the workspace at D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2

    05/10/2017 00:30:44 root INFO Starting natcap.invest.pollination.pollination

    05/10/2017 00:30:44 root INFO Setting tempfile.tempdir to D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\tmp

    05/10/2017 00:30:44 natcap.invest.pollination.pollination INFO Starting pollination model for the cur scenario

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG Opening landuse raster from D:/InVEST_3.3.3_x86/Pollination/Data/landusespa/hdr.adf

    05/10/2017 00:30:44 natcap.invest.pollination.pollination INFO Opening landuse attributes table

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG Parsed nesting fields: ['cavity', 'ground']

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG Parsed floral fields: ['spring']

    05/10/2017 00:30:44 natcap.invest.pollination.pollination INFO Opening guilds table

    05/10/2017 00:30:44 natcap.invest.pollination.pollination INFO Processing agricultural classes

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG Parsed ag classes: []

    05/10/2017 00:30:44 natcap.invest.pollination.pollination INFO Creating top-level raster URIs

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG foraging_total: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\output\frm_tot_cur.tif

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG foraging_average: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\output\frm_avg_cur.tif

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG farm_value_sum: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\intermediate\frm_val_sum_cur.tif

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG service_value_sum: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\output\sup_val_sum_cur.tif

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG abundance_total: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\output\sup_tot_cur.tif

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG ag_map: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\intermediate\agmap_cur.tif

    05/10/2017 00:30:44 natcap.invest.pollination.pollination INFO Creating species-specific raster URIs

    05/10/2017 00:30:44 natcap.invest.pollination.pollination INFO Creating rasters for Apis

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG nesting: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\intermediate\hn_Apis_cur.tif

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG floral: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\intermediate\hf_Apis_cur.tif

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG species_abundance: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\intermediate\sup_Apis_cur.tif

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG farm_abundance: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\intermediate\frm_Apis_cur.tif

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG farm_value: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\intermediate\frm_val_Apis_cur.tif

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG value_abundance_ratio: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\intermediate\val_sup_ratio_Apis_cur.tif

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG value_abundance_ratio_blur: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\intermediate\val_sup_ratio_blur_Apis_cur.tif

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG service_value: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\intermediate\sup_val_Apis_cur.tif

    05/10/2017 00:30:44 natcap.invest.pollination.pollination INFO Creating rasters for Bombus

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG nesting: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\intermediate\hn_Bombus_cur.tif

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG floral: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\intermediate\hf_Bombus_cur.tif

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG species_abundance: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\intermediate\sup_Bombus_cur.tif

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG farm_abundance: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\intermediate\frm_Bombus_cur.tif

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG farm_value: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\intermediate\frm_val_Bombus_cur.tif

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG value_abundance_ratio: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\intermediate\val_sup_ratio_Bombus_cur.tif

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG value_abundance_ratio_blur: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\intermediate\val_sup_ratio_blur_Bombus_cur.tif

    05/10/2017 00:30:44 natcap.invest.pollination.pollination DEBUG service_value: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\intermediate\sup_val_Bombus_cur.tif

    05/10/2017 00:30:44 natcap.invest.pollination.core DEBUG Starting pollination calculations

    05/10/2017 00:30:44 natcap.invest.pollination.core DEBUG Using nodata value of -1.0 for internal rasters

    05/10/2017 00:30:44 natcap.invest.pollination.core INFO Starting to create an ag raster at D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\intermediate\agmap_cur.tif. Nodata=-1.0

    05/10/2017 00:30:44 natcap.invest.pollination.core DEBUG Agricultural reclass map={1.0: 1.0, 2.0: 1.0, 3.0: 1.0, 4.0: 1.0, 5.0: 1.0, 6.0: 1.0, 7.0: 1.0, 8.0: 1.0, 9.0: 1.0, 10.0: 1.0, 11.0: 1.0, 12.0: 1.0, 13.0: 1.0, 15.0: 1.0, 16.0: 1.0, 17.0: 1.0, 18.0: 1.0, 19.0: 1.0, 20.0: 1.0, 21.0: 1.0, 22.0: 1.0, 23.0: 1.0, 24.0: 1.0, 25.0: 1.0, 26.0: 1.0, 28.0: 1.0, 29.0: 1.0, 30.0: 1.0, 31.0: 1.0, 32.0: 1.0, 33.0: 1.0, 35.0: 1.0, 37.0: 1.0, 38.0: 1.0, 41.0: 1.0, 42.0: 1.0, 44.0: 1.0}

    05/10/2017 00:30:44 root ERROR ---------------------------------------------------

    05/10/2017 00:30:44 root ERROR ---------------------- ERROR ----------------------

    05/10/2017 00:30:44 root ERROR ---------------------------------------------------

    05/10/2017 00:30:44 root ERROR Error: exception found while running natcap.invest.pollination.pollination

    05/10/2017 00:30:44 root DEBUG

    05/10/2017 00:30:44 root DEBUG Build details

    05/10/2017 00:30:44 root DEBUG Interpreter

    05/10/2017 00:30:44 root DEBUG Current temp dir: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\tmp

    05/10/2017 00:30:44 root DEBUG tempfile.tempdir: D:\InVEST_3.3.3_x86\Pollination\Trial\Trial2\tmp

    05/10/2017 00:30:44 root DEBUG

    05/10/2017 00:30:44 root DEBUG System

    05/10/2017 00:30:44 root DEBUG OS : Windows-8-6.2.9200

    05/10/2017 00:30:44 root DEBUG Processor architecture: AMD64

    05/10/2017 00:30:44 root DEBUG FS encoding : mbcs

    05/10/2017 00:30:44 root DEBUG Preferred encoding: cp1252

    05/10/2017 00:30:44 root DEBUG

    05/10/2017 00:30:44 root DEBUG Python

    05/10/2017 00:30:44 root DEBUG Version : 2.7.9

    05/10/2017 00:30:44 root DEBUG Build : ('default', 'Dec 10 2014 12:24:55')

    05/10/2017 00:30:44 root DEBUG Compiler : MSC v.1500 32 bit (Intel)

    05/10/2017 00:30:44 root DEBUG Implementation : CPython

    05/10/2017 00:30:44 root DEBUG Architecture : 32bit

    05/10/2017 00:30:44 root DEBUG Linkage format : WindowsPE

    05/10/2017 00:30:44 root DEBUG

    05/10/2017 00:30:44 root DEBUG Packages

    05/10/2017 00:30:44 root DEBUG Cython : ?

    05/10/2017 00:30:44 root DEBUG Numpy : 1.11.2

    05/10/2017 00:30:44 root DEBUG Scipy : 0.16.1

    05/10/2017 00:30:44 root DEBUG OSGEO : 1.11.3

    05/10/2017 00:30:44 root DEBUG Shapely : 1.5.5

    05/10/2017 00:30:44 root DEBUG InVEST : 3.3.3

    05/10/2017 00:30:44 root DEBUG

    05/10/2017 00:30:44 root DEBUG

    05/10/2017 00:30:44 root DEBUG Exception not environment-related

    05/10/2017 00:30:44 root DEBUG Printing traceback

    Traceback (most recent call last):

    File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\natcap.invest.iui.executor", line 620, in runModel

    File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\natcap.invest.pollination.pollination", line 236, in execute

    File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\natcap.invest.pollination.pollination_core", line 93, in execute_model

    File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\pygeoprocessing.geoprocessing", line 2287, in vectorize_datasets

    File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\pygeoprocessing.geoprocessing", line 1989, in align_dataset_list

    File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\pygeoprocessing.geoprocessing", line 1740, in assert_datasets_in_same_projection

    DatasetUnprojected: These datasets are unprojected set(['D:\\InVEST_3.3.3_x86\\Pollination\\Trial\\Trial2\\intermediate\\agmap_cur.tif'])



    05/10/2017 00:30:44 root ERROR Exiting due to failures


    I am using a 250m x 250m, when I reprojected to the UTM it runs pretty fast...


    Thank you so much for your help again!

    Post edited by jgallegozamorano on
  • RichRich Administrator, NatCap Staff
    Hi, that error looks like your raster input is totally unprojected, perhaps lat/lng?  You'll want something that'll give you linear units of meters.  And the new model should be along soon.  The code is in an internal review process right now, but I'll post here when it's available. 
  • Hi, there was a problem with the format of the raster, I converted to Tiff format and I could run it with the projection that I had. Hoping to use the new version.

    Thank you so much!

Sign In or Register to comment.