Skip to content

Releases: natcap/invest

3.9.2

29 Oct 20:33
Compare
Choose a tag to compare

3.9.2

This bugfix release includes the following fixes and features:

  • General:

    • Improving our binary build by including a data file needed for
      the charset-normalizer python package. This eliminates a
      warning that was printed to stdout on Windows.
    • The Annual Water Yield model name is now standardized throughout
      InVEST. This model has been known in different contexts as
      Hydropower, Hydropower Water Yield, or Annual Water Yield. This
      name was chosen to emphasize that the model can be used for
      purposes other than hydropower (though the valuation component
      is hydropower-specific) and to highlight its difference from the
      Seasonal Water Yield model. The corresponding python module,
      formerly natcap.invest.hydropower.hydropower_water_yield, is
      now natcap.invest.annual_water_yield.
    • Minor changes to some other models' display names.
    • Update and expand on the instructions in the API docs for
      installing the natcap.invest package.
    • The InVEST binaries on Windows now no longer inspect the
      %PATH% when looking for GDAL DLLs. This fixes an issue where
      InVEST would not launch on computers where the %PATH% either
      contained other environment variables or was malformed.
    • JSON sample data parameter sets are now included in the complete
      sample data archives.
  • Seasonal Water Yield

    • Fixed a bug in validation where providing the monthly alpha
      table would cause a "Spatial file <monthly alpha table>
      has no projection" error. The montly alpha table was mistakenly
      being validated as a spatial file.
  • Crop Production Regression

    • Corrected a misspelled column name. The fertilization rate table
      column must now be named phosphorus_rate, not
      phosphorous_rate.
  • Habitat Quality

    • Fixed a bug where optional input Allow Accessibility to Threats
      could not be passed as an empty string argument. Now handles
      falsey values.
  • Urban Flood Risk

    • Fixed a bug where lucodes present in the LULC raster but missing
      from the biophysical table would either raise a cryptic
      IndexError or silently apply invalid curve numbers. Now a
      helpful ValueError is raised.

3.9.1

23 Sep 18:30
Compare
Choose a tag to compare

This bugfix release includes the following fixes and features:

  • General:

    • Added error-handling for when pandas fails to decode a
      non-utf8 encoded CSV.
    • Moved the sample data JSON files out of the root sample_data
      folder and into their respective model folders.
    • Updated documentation on installing InVEST from source.
    • Restructured API reference docs and removed outdated and
      redundant pages.
    • Include logger name in the logging format. This is helpful for
      the cython modules, which can't log module, function, or line
      number info.
    • Fixed a bug in makefile that prevented make env from working
      properly.
    • Fixed an issue with the InVEST application launching on Mac OS X
      11 "Big Sur". When launching the InVEST .app bundle, the
      environment variable QT_MAC_WANTS_LAYER is defined. If running
      InVEST through python, this environment variable may need to be
      defined by hand like so:
      QT_MAC_WANTS_LAYER=1 python -m natcap.invest. A warning will
      be raised if this environment variable is not present on mac.
    • Fixing an issue on Mac OS X where saving the InVEST application
      to a filepath containing spaces would prevent the application
      from launching.
    • Fixed an issue on Mac OS when certain models would loop
      indefinitely and never complete. This was addressed by bumping
      the taskgraph requirement version to 0.10.3
    • Allow Windows users to install for all users or current user.
      This allows non-admin users to install InVEST locally.
    • Fixed a bug where saving a datastack parameter set with relative
      paths would not convert Windows separators to linux style.
    • Provide a better validation error message when an overview
      '.ovr' file is input instead of a valid raster.
    • Removed internal references to TaskGraph
      copy_duplicate_artifact calls in anticipation from that
      feature being removed from TaskGraph. User facing changes
      include slightly faster initial runtimes for the Coastal
      Vulnerability, Coastal Blue Carbon, SDR, DelineateIt, and
      Seasonal Water Yield models. These models will no longer attempt
      to copy intermediate artifacts that could have been computed by
      previous runs.
    • Validation now returns a more helpful message when a spatial
      input has no projection defined.
    • Updated to pygeoprocessing 2.3.2
    • Added support for GDAL 3.3.1 and above
    • Added some logging to natcap.invest.utils._log_gdal_errors to
      aid in debugging some hard-to-reproduce GDAL logging errors that
      occasionally cause InVEST models to crash. If GDAL calls
      _log_gdal_errors with an incorrect set of arguments, this is
      now logged.
  • Carbon

    • Fixed a bug where, if rate change and discount rate were set to
      0, the valuation results were in $/year rather than $, too small
      by a factor of lulc_fut_year - lulc_cur_year.
    • Improved UI to indicate that Calendar Year inputs are only
      required for valuation, not also for sequestration.
    • Increasing the precision of numpy.sum from Float32 to Float64
      when aggregating raster values for the HTML report.
  • DelineateIt:

    • The DelineateIt UI has been updated so that the point-snapping
      options will always be interactive.
    • DelineateIt's point-snapping routine has been updated to snap
      MULTIPOINT geometries with 1 component point as well as
      primitive POINT geometries. All other geometric types will not
      be snapped. When a geometry cannot be snapped, a log message is
      now recorded with the feature ID, the geometry type and the
      number of component geometries. Features with empty geometries
      are now also skipped.
  • Fisheries Habitat Scenario Tool

    • Fixed divide-by-zero bug that was causing a RuntimeWarning in
      the logs. This bug did not affect the output.
  • HRA

    • Fixed bugs that allowed zeros in DQ & Weight columns of criteria
      table to raise DivideByZero errors.
  • NDR

    • Fixed a bug that allowed SDR to be calculated in areas that
      don't drain to any stream. Now all outputs that depend on
      distance to stream ( d_dn, dist_to_channel, ic, ndr_n,
      ndr_p, sub_ndr_n, sub_ndr_p, n_export, p_export) are
      only defined for pixels that drain to a stream. They have nodata
      everywhere else.
  • Pollination

    • Updated so that the total_pollinator_abundance_[season].tif
      outputs are always created. Before, they weren't created if a
      farm vector was not supplied, even though they are independent.
  • Recreation

    • Fixed some incorrectly formatted log and error messages
  • Seasonal Water Yield

    • Fixed a bug where qf.tif outputs weren't properly masking
      nodata values and could show negative numbers.
  • SDR

    • Fixed a bug in validation that did not warn against different
      coordinate systems (all SDR inputs must share a common
      coordinate system).
    • Fixed a bug that was incorrectly using a factor of 0.0986 rather
      than 0.0896. This would have a minor effect on end-user results.
    • Changed how SDR thresholds its L factor to allow direct
      thresholding rather than based off of upstream area. Exposed
      this parameter as l_max in the args input and in the user
      interface.
    • Fixed a bug that allowed SDR to be calculated in areas that
      don't drain to any stream. Now all outputs that depend on
      distance to stream ( d_dn, d_dn_bare, ic, ic_bare,
      sdr, sdr_bare, e_prime, sed_retention,
      sed_retention_index, sed_deposition, sed_export) are only
      defined for pixels that drain to a stream. They have nodata
      everywhere else.
  • Urban Flood Risk

    • Fixed a bug where a String Type column in the infrastructure
      vector would cause the aggregation step of the model to crash,
      even with the correct integer value in the column.
  • Wind Energy

    • Raising ValueError when AOI does not intersect Wind Data points.

InVEST 3.9.0

12 Dec 00:59
a23dd2b
Compare
Choose a tag to compare

3.9.0

This minor release includes the following fixes and features:

  • General

    • Deprecating GDAL 2 and adding support for GDAL 3.

    • Adding function in utils.py to handle InVEST coordindate
      transformations.

    • Making InVEST compatible with Pygeoprocessing 2.0 by updating:

      • convolve_2d() keyword ignore_nodata to
        ignore_nodata_and_edges.
      • get_raster_info() / get_vector_info() keyword
        projection to projection_wkt.
    • Improve consistency and context for error messages related to
      raster reclassification across models by using
      utils.reclassify_raster.

    • Fixed bug that was causing a TypeError when certain input
      rasters had an undefined nodata value. Undefined nodata values
      should now work everywhere.

    • Include logging in python script generated from "Save to python
      script..." in the "Development" menu. Now logging messages from
      the model execution will show up when you run the script.

    • InVEST is now a 64-bit binary built against Python 3.7.

    • Adding Python 3.8 support for InVEST testing.

    • Add warning message to installer for 32-bit computers about
      installing 64-bit software.

    • Stop running validation extra times when model inputs autofill,
      saving a small but noticeable amount of time in launching a
      model.

    • The number of files included in the python source distribution
      has been reduced to just those needed to install the python
      package and run tests.

    • Code-sign the macOS distribution, and switch to a DMG
      distribution format.

    • No longer include the HTML docs or HISTORY.rst in the macOS
      distribution.

    • Bumped the shapely requirements to >=1.7.1 to address a
      library import issue on Mac OS Big Sur.

    • Fixing model local documentation links for Windows and Mac
      binaries.

    • The InVEST binary builds now launch on Mac OS 11 "Big Sur". This
      was addressed by defining the QT_MAC_WANTS_LAYER environment
      variable.

    • Fixed the alphabetical ordering of Windows Start Menu shortcuts.

  • Annual Water Yield

    • Fixing bug that limited rsupply result when wyield_mn or
      consump_mn was 0.
  • Coastal Blue Carbon

    • Refactor of Coastal Blue Carbon that implements TaskGraph for
      task management across the model and fixes a wide range of
      issues with the model that were returning incorrect results in
      all cases.
    • Corrected an issue with the model where available memory would
      be exhausted on a large number of timesteps.
    • In addition to the execute entrypoint, another entrypoint,
      execute_transition_analysis has been added that allows access
      to the transition analysis timeseries loop at a lower level.
      This will enable users comfortable with python to provide
      spatially-explicit maps of accumulation rates, half lives and
      other parameters that can only be provided via tables to
      execute.
    • Snapshot years and rasters, including the baseline year/raster,
      are now all provided via a table mapping snapshot years to the
      path to a raster on disk. The baseline year is the earliest year
      of these.
    • The model's "initial" and "lulc lookup" and "transient" tables
      have been combined into a single "biophysical" table, indexed by
      LULC code/LULC class name, that includes all of the columns from
      all of these former tables.
    • The "analysis year" is now a required input that must be >=
      the final snapshot year in the snapshots CSV.
    • Litter can now accumulate at an annual rate if desired.
    • The model now produces many more files, which allows for greater
      flexibility in post-processing of model outputs.
  • Coastal Vulnerability

    • 'shore_points_missing_geomorphology.gpkg' output file name
      now includes the suffix if any, and its one layer now is renamed
      from 'missing_geomorphology' to be the same as the file name
      (including suffix).
    • Fixed a memory bug that occurred during shore point
      interpolation when dealing with very large landmass vectors.
  • Delineateit

    • The layer in the 'preprocessed_geometries.gpkg' output is
      renamed from 'verified_geometries' to be the same as the file
      name (including suffix).
    • The layer in the 'snapped_outlets.gpkg' output is renamed from
      'snapped' to be the same as the file name (including suffix).
    • The layer in the 'watersheds.gpkg' output has been renamed from
      'watersheds' to match the name of the vector file (including the
      suffix).
    • Added pour point detection option as an alternative to providing
      an outlet features vector.
  • Finfish

    • Fixed a bug where the suffix input was not being used for output
      paths.
  • Forest Carbon Edge Effect

    • Fixed a broken link to the local User's Guide
    • Fixed bug that was causing overflow errors to appear in the logs
      when running with the sample data.
    • Mask out nodata areas of the carbon map output. Now there should
      be no output data outside of the input LULC rasater area.
  • GLOBIO

    • Fixing a bug with how the msa results were masked and operated
      on that could cause bad results in the msa outputs.
  • Habitat Quality

    • Refactor of Habitat Quality that implements TaskGraph
    • Threat files are now indicated in the Threat Table csv input
      under required columns: BASE_PATH, CUR_PATH, FUT_PATH.
    • Threat and Sensitivity column names are now case-insensitive.
    • Sensitivity threat columns now match threat names from Threat
      Table exactly, without the need for "L". "L" prefix is
      deprecated.
    • Threat raster input folder has been removed.
    • Validation enhancements that check whether threat raster paths
      are valid.
    • HQ update to User's Guide.
    • Changing sample data to reflect Threat Table csv input changes
      and bumping revision.
    • More comprehensive testing for Habitat Quality and validation.
    • Checking if Threat raster values are between 0 and 1 range,
      raising ValueError if not. No longer snapping values less than 0
      to 0 and greater than 1 to 1.
    • Fixing bug that was setting Threat raster values to 1 even if
      they were floats between 0 and 1.
    • Updating how threats are decayed across distance. Before, nodata
      edges were ignored causing values on the edges to maintain a
      higher threat value. Now, the decay does not ignore those nodata
      edges causing values on the edges to decay more quickly. The
      area of study should have adequate boundaries to account for
      these edge effects.
    • Update default half saturation value for sample data to 0.05
      from 0.1.
  • Seasonal Water Yield

    • Fixed a bug where precip or eto rasters of GDT_Float64 with
      values greater than 32-bit would overflow to -inf.
  • SDR

    • Fixing an issue where the LS factor should be capped to an
      upstream area of 333^2 m^2. In previous versions the LS factor
      was erroneously capped to "333" leading to high export spikes in
      some pixels.
    • Fixed an issue where sediment deposition progress logging was
      not progressing linearly.
    • Fixed a task dependency bug that in rare cases could cause
      failure.
  • Urban Cooling

    • Split energy savings valuation and work productivity valuation
      into separate UI options.
  • Urban Flood Risk

    • Changed output field names aff.bld and serv.blt to aff_bld
      and serv_blt respectively to fix an issue where ArcGIS would
      not display properly.

3.8.9

15 Sep 22:00
Compare
Choose a tag to compare

3.8.9 (2020-09-15)

  • Hydropower
    • Fixed bug that prevented validation from ever passing for this model.
      Validation will allow extra keys in addition to those in the ARGS_SPEC.
  • Urban Flood Mitigation
    • Fixed incorrect calculation of total quickflow volume.

3.8.8

04 Sep 21:42
Compare
Choose a tag to compare

3.8.8 (2020-09-04)

  • Coastal Vulnerability
    • Improved handling of invalid AOI geometries to avoid crashing and instead
      fix the geometry when possible and skip it otherwise.
    • Added validation check that shows a warning if the SLR vector is not
      a point or multipoint geometry.
  • Urban Cooling
    • Energy units are now (correctly) expressed in kWh. They were previously
      (incorrectly) expressed in kW.
    • Energy savings calculations now require that consumption is in units of
      kWh/degree C/m^2 for each building class.
    • Fixing an issue where blank values of the Cooling Coefficient weights
      (shade, albedo, ETI) would raise an error. Now, a default value for the
      coefficient is assumed if any single value is left blank.
  • HRA
    • Raise ValueError if habitat or stressor inputs are not projected.
    • Make sample data rating filepaths work on Mac. If not on Windows and a rating
      filepath isn't found, try replacing all backslashes with forward slashes.
  • Seasonal Water Yield
    • Updated output file name from aggregated_results.shp to aggregated_results_swy.shp
      for consistency with NDR and SDR
  • Datastack
    • Saved datastack archives now use helpful identifying names for spatial input folders
  • Validation
    • Fixed bug that caused fields activated by a checkbox to make validation fail,
      even when the checkbox was unchecked.
  • General
    • Input table column headers are now insensitive to leading/trailing whitespace in
      most places.
    • Modified the script that produces a conda environment file from InVEST's python
      requirements file so that it includes the conda-forge channel in the file
      itself.
  • Recreation
    • Validate values in the type column of predictor tables early in execution. Raise
      a ValueError if a type value isn't valid (leading/trailing whitespace is okay).
  • Validation
    • Set a 5-second timeout on validation functions that access a file. This will raise
      a warning and prevent validation from slowing down the UI too much.

3.8.7

17 Jul 18:14
Compare
Choose a tag to compare

This bugfix release includes the following fixes and features:

  • General

    • Fixed an issue where some users would be unable to launch InVEST
      binaries on Windows. This crash was due to a configuration issue
      in PySide2==5.15.0 that will be fixed in a future release of
      PySide2.
  • GLOBIO

    • Fix a bug that mishandled combining infrastructure data when
      only one infrastructure data was present.
  • Urban Flood Risk

    • The output vector flood_risk_service.shp now includes a field,
      flood_vol that is the sum of the modeled flood volume (from
      Q_m3.tif) within the AOI.
    • Fieldnames in flood_risk_service.shp have been updated to more
      closely match the variables they match as documented in the
      User's Guide chapter. Specifically, serv_bld is now serv.blt
      and aff_bld is now aff.bld.
    • Q_mm.tif has been moved from the intermediate directory into
      the workspace.
    • Fixed a bug in the flood volume (Q_m3.tif) calculations that
      was producing incorrect values in all cases.

3.8.6

03 Jul 17:02
Compare
Choose a tag to compare

This bugfix release includes the following fixes and features:

  • Crop Production
    • Fixed critical bug in crop regression that caused incorrect
      yields in all cases.

3.8.5

26 Jun 17:02
Compare
Choose a tag to compare

This bugfix release includes the following fixes and features:

  • General

    • Fix bug in utils.build_lookup_from_csv that was allowing key_field to be non unique and overwriting values.
    • Fix bug in utils.build_lookup_from_csv where trailing commas caused returned values to be malformed.
    • Add optional argument column_list to utils.build_lookup_from_csv that takes a list of column names and only returns those in the dictionary.
    • Remove warn_if_missing argument from utils.build_lookup_from_csv and warning by default.
  • Urban Flood Risk Mitigation

    • Fixed an issue where the output vector flood_risk_service.shp would only be created when the built infrastructure vector was provided. Now, the flood_risk_service.shp vector is always created, but the fields created differ depending on whether the built infrastructure input is present during the model run.
    • Fixed an issue where the model would crash if an infrastructure geometry were invalid or absent. Such features are now skipped.
  • Scenic Quality

    • Fixing an issue in Scenic Quality where the creation of the weighted sum of visibility rasters could cause "Too Many Open Files" errors and/or MemoryError when the model is run with many viewpoints.
    • Progress logging has been added to several loops that may take a longer time when the model is run with thousands of points at a time.
    • A major part of the model's execution was optimized for speed, particularly when the model is run with many, many points.
  • SDR:

    • Removed the unused parameter args['target_pixel_size'] from the SDR execute docstring.

3.8.4

05 Jun 17:01
Compare
Choose a tag to compare

This bugfix release includes the following fixes and features:

  • General:

    • Advanced the Taskgraph version requirement to fix a bug where workspace directories created by InVEST versions <=3.8.0 could not be re-used by more recent InVEST versions.
  • NDR:

    • The Start Menu shortcut on Windows and launcher label on Mac now have consistent labels for NDR: "NDR: Nutrient Delivery Ratio".
  • SDR:

    • The Start Menu shortcut on Windows and launcher label on Mac now have consistent labels for SDR: "SDR: Sediment Delivery Ratio".

3.8.3

01 Jun 16:59
Compare
Choose a tag to compare

This bugfix release includes the following fixes and features:

  • SDR's compiled core now defines its own SQRT2 instead of relying
    on an available standard C library definition. This new definition
    helps to avoid some compiler issues on Windows.