Error in Coastal Vulnerability Model - can't interpolate wwiii to shore points

Hi everyone,

I already ran successfully the model with other test data, and the forum has helped me a lot to troubleshoot problems by myself in other models - but now I am really stuck. I already read tons of posts with hints on how to troubleshoot myself, especially from Dave, Douglas and Stacey, but I am getting an error that does not make sense and now I am wondering if it is not some bug in the model?

The log says that the WWIII points are outside my AOI, but I tried many different things to fix it and none worked, to me the AOI has tons of WWIII points. I tried using the global WWIII downloaded directly from invest, tried using one cut exactly by the AOI boundaries and still no luck. I was originally using a projected version to match all other data (UTM 24S, since I saw a post saying that UTM was a reliable meter-based projection), but I saw in another post a reccommendation to use original file, so I also corrected that and still doesnt run.

I also have SLR and Population data but am not including this yet to try to run it first, and am also using ridiculously huge resolutions to try to see what is wrong, following instructions from other threads.

I am using Invest version 3.8.6.post31+gaf49c804_x86 because it was the only one that worked in my computer. I downloaded this version from a specific thread here in the community to solve the previous issues (in the other versions only the black code screen appeared, and not the gray one with paths to maps).

Could you see what might be going on? I attached several log files from my attempts if it can be some sort of guidance, but please focus on the latest, as it should be the most ‘correct’ one.
PS: I have two options of AOI, one with a large hand-drawn polygon and one with a buffer around the coastline to test and neither solved the problem.

Data and log files: WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free

Thank you very much in advance,

1 Like

Hi @stellamanes -

You’re a star for doing so much sleuthing! Thanks for listing all of your efforts and sending the data and log files.

I tried running your data with InVEST 3.10.1 and the global WWIII dataset (both the one you sent and another copy from the sample data, just in case) and had the same problem. My initial guess was that something was funky about the coordinate systems, but they look ok to me, and the layers look fine in a GIS. I also looked through the model’s intermediate files, and the ones related to landmass and shoreline points look fine to me. Sure enough, the intermediate file for WWIII contains no points.

There was one INFO message in the log file about “Ring Self-intersection”, so I tried using ArcGIS’s Repair Geometry tool on the landmass layer, in case that was causing problems, but it didn’t help.

Then I wondered if the AOI being cut off at the island was causing problems, so I created a larger buffer for the AOI, that didn’t help either.

Hey software team, would you please take a look at this? I’m as stumped as Stella.

(By the way, it would be good to figure out why the latest version of InVEST doesn’t work on your computer…)

~ Stacie

1 Like

Thanks Stacie @swolny ! Now i’m torn: partially I am glad that the reason was not some input mistake since the model was prepared correctly, but I’m also sad because it might not be so straightforward to solve (mixed feelings vibes)! It is strange because i was previously able to get some test results with other maps for the same area, so it is not a problem of large scale or anything, really strange indeed because visually everything seems right

I’ll wait to see if the rest of the team can find an escape strategy!!


Hi @stellamanes , thanks for sharing all these details. This is a tricky one, but the issue appears to be with the landmass polygon. Here’s an image of the intermediate results after the error happens:

There are some red shore points very far away from the blue WW3 points. And that is the reason for the error. All shore points must have WW3 data within 3 degrees (or about 200km). Otherwise it wouldn’t make sense to apply the wind/wave data to those points.

Anyway, it’s best to not clip the landmass polygon at all before running the model, because in this case the model thinks that vertical edge on the left is a coastline. There would be shore points all up and down that edge (within the AOI) if I had chosen a smaller model resolution.

If you do have an “incomplete” landmass like this, then it’s important that the AOI (gray outline here) only intersects the actual coastline edge, not any of the other edges. Your narrower AOI should work with this landmass, for example, though it’s taking much longer to process.


FYI, the extremely high complexity of the landmass polygon might result in some pretty long runtimes. One thing I noticed in a few places are overlapping polygons like this. There’s a big yellow one underneath the slightly more detailed greenish one. And a lot of the surrounding ones this image seem to have the same problem. It could be worth trying to clean those up, or looking for a cleaner dataset.

Interesting @dave, I learned something - thanks!

~ Stacie

1 Like

OMG you are all amazing! Thanks for identifying whats seems to be the error Dave @dave!

I do have a shapefile for entire Brazil that is normal - BUT I found a polyline file only for the brazilian coastal limits with much more detail, but since the model only accepts polygons the only way possible was to connect the polyline edges with this horrifying left line hahahahah Then, not satisfied, I also merged this polyline-to-polygon monster with another shapefile with the coastal islands. That is why some parts might have been superimposed with each other, I didnt notice that.

All my frankstein map collage was in hope to get the most detailed coastline possible to improve the model closer to the reality. Do you think such efforts are worth it, in such large spatial scale, or the scale is so large that such efforts would only mean real differences for smaller scales? The goal is to assess the coastal vulnerability of the brazilian coast with and without the natural habitats to compare and establish the magnitude of their value already.

I can use the normal shape of Brazil alone (without the detailed coastline), or maybe only merge with the islands? I thought that the islands would be important because regardless of natural habitats or other biophysical factors, the presence of islands would buffer the coast, and thus was an important factor to consider for the coast and to examine the islands’ vulnerability for themselves if the resolution allows it.

See the coastline details in both (black is the plain shape and the pink line is the detailed polyline shape):

And in blue see the islands shapefile:

Regardless, using the smaller AOI should suffice then? I hand-drew the large AOI because the manual said that sometimes the model gets values much further from the actual coast to calculate inputs, so I just drew a huge polygon to be sure, but if the 5km buffer on the coast could be enough I’ll use that one from now on.

I’ll let go of the polyline monster and try some tests with the Brazilian plain simple shape and afterwards adding the islands and let you know!

Thank you very much for all your help,

This is a very good reason to include the islands in the landmass. As an aside: if the islands are unpopulated, or you don’t want to analyze the vulnerability on the islands for any other reason, then you could carefully draw your AOI to exclude the islands. They will still be useful in the wind & wave calculations for their barrier effect.

Other than that, I would try to minimize the number of different data sources you’re merging together, just to save yourself the effort. Once you decide on the model resolution that you want, then you can decide if you need a more detailed coastline than you already have. At the scale of half a continent, it will be a lot of effort to examine the inputs and outputs at a very high level of detail anyway.

The only use for the AOI is to designate which section of the coastline should have shore points created along it. So it doesn’t really matter how large/small it is, so long as it doesn’t have the problem we see in the image I attached above.

Good luck!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.