'Received a NULL pointer'

Hi,

I have been trying to use the InVest 8 model for Coastal Vulnerability but I am having two problems doing so:

  1. All the entry data is valid and marked as accepted until I enter the population raster despite it being at a global scale and InVest telling me it will be reprojected to the Area of interest’s projection. How can this be fixed? Are there only specific projections that are accepted?

  2. When I run the model without the population raster (as it’s optional), there is an error before any sort of results cited as ‘ValueError Encountered: Received a NULL pointer’. What does this mean and how do I know which data set it comes from?

InVEST-Coastal-Vulnerability-log-2020-02-26–10_23_05.txt (5.0 KB)

Many Thanks,
Camille

Hi Camille,

About your population raster, the model should be able to accept any spatial reference system that GDAL supports (which is a lot, but admittedly not all of them … Web Mercator is not supported, for example). What is the error that the UI is showing you?

The ValueError looks like it’s coming from the surge exposure calculations, and, based on your logfile, the real issue looks like it’s actually a few lines up from the error itself:

ERROR [errno 5] OGR Error: Corrupt data

Taking a look at the CV source code, it looks like the line it’s failing on is when taking the intersection of the continental shelf geometries in continental_shelf_polyline_global.shp with the bounding box of your shore points. Could you double-check the validity of those geometries and repair anything that’s invalid? If that doesn’t do the trick and the model is still failing with this same error, let us know and we’ll keep troubleshooting!

James

1 Like