# TopologyException in SDR | InVEST 3.17

**URL:** <https://community.naturalcapitalalliance.org/t/topologyexception-in-sdr-invest-3-17/6333>\
**Category:** Software Support\
**Tags:** sdr\
**Created:** [January 26, 2026, 2:55pm UTC](https://community.naturalcapitalalliance.org/t/topologyexception-in-sdr-invest-3-17/6333 "2026-01-26T14:55:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thais.doria](https://avatars.discourse-cdn.com/v4/letter/t/f4b2a3/32.png) [@thais.doria](https://community.naturalcapitalalliance.org/u/thais.doria)\
**Post date:** [January 26, 2026, 2:55pm UTC](https://community.naturalcapitalalliance.org/t/topologyexception-in-sdr-invest-3-17/6333/1 "2026-01-26T14:55:11Z")

</div>

Hello everyone!

I am trying to run SDR (Sediment Delivery Ratio) model in InVEST, bust the model crashes during execution with the following error message:

**2026-01-26 10:30:36 natcap.invest.utils ERROR Exception while executing sdr  
Traceback (most recent call last):  
File “natcap\invest\utils.py”, line 171, in prepare\_workspace  
File “natcap\invest\spec.py”, line 2194, in execute  
File “natcap\invest\sdr\sdr.py”, line 1005, in execute  
File “taskgraph\Task.py”, line 684, in add\_task  
File “taskgraph\Task.py”, line 1103, in \_call  
File “natcap\invest\sdr\sdr.py”, line 1574, in \_generate\_report  
File “natcap\invest\urban\_nature\_access.py”, line 1578, in \_geometries\_overlap  
File “shapely\ops.py”, line 117, in unary\_union  
File “shapely\decorators.py”, line 173, in wrapper  
File “shapely\decorators.py”, line 88, in wrapped  
File “shapely\set\_operations.py”, line 553, in union\_all  
shapely.errors.GEOSException: TopologyException: side location conflict at 105958.42278252472 1827072.958573573. This can occur if the input geometry is invalid.**

The traceback indicates that the error occurs during a geometry union operation (`shapely.ops.unary_union`), but I am not sure which specific input layer or geometry is causing the issue, nor the recommended way to address it within the InVEST SDR workflow.

I expect the SDR model to run successfully and generate the standard outputs using my input datasets, which are all projected to the same CRS and appear spatially consistent. Prior to running SDR, I successfully ran the SWY model using a subset of the same inputs, and it completed without errors.

So far, I have verified that all raster and vector inputs use the same coordinate reference system and spatially overlap as expected. I also visually inspected the vector layers for geometry problems, but did not identify any obvious issues. However, I am unsure how to systematically identify and repair potentially invalid geometries that could be triggering this error, or which specific SDR input layers are involved in the geometry union step.

[InVEST-sdr-log-2026-01-26–10\_26\_57.txt](https://community.naturalcapitalalliance.org/uploads/short-url/ltVcLwV8mGJFO9nwOTJVA0zvwW.txt) (26.3 KB)

---

<div class="post-metadata">

**Author:** ![dave](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/dave/32/70_2.png) [@dave](https://community.naturalcapitalalliance.org/u/dave)\
**Post date:** [February 18, 2026, 4:24pm UTC](https://community.naturalcapitalalliance.org/t/topologyexception-in-sdr-invest-3-17/6333/2 "2026-02-18T16:24:41Z")

</div>

Hi @thais.doria , sorry for the delay in addressing your issue.

The error indicates there is some invalid geometry in the watersheds input layer, specifically at the location `(105958.42278252472 1827072.958573573)`. You could use those coordinates to closely examine the layer in GIS and try to find and fix the invalid geometry, or you could run a GIS tool to check for invalid geometries, or “repair” geometries. But it seems that this specific “side location conflict” may not always reveal itself when using such tools.

Alternatively, you could try running a buffer operation on your watershed polygon input. A “buffer with distance 0” has been known to fix invalid geometries.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex031/uploads/naturalcapitalproject/original/2X/8/8d95591aa074da87ea0fdd61ca47c1c3c0588aa7.png) [@system](https://community.naturalcapitalalliance.org/u/system)\
**Post date:** [May 19, 2026, 4:25pm UTC](https://community.naturalcapitalalliance.org/t/topologyexception-in-sdr-invest-3-17/6333/3 "2026-05-19T16:25:35Z")

</div>

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