FlowWest / swc-habitat-suitability

0 stars 0 forks source link

Aquatic species #4

Closed MaddeeRubenson closed 5 months ago

MaddeeRubenson commented 8 months ago
skylerlewis commented 7 months ago

@MaddeeRubenson The output tables had more rows than the number of COMIDs (total should be 178,868 rows). Some COMIDs were getting duplicated because the line segment overlapped multiple catchment polygons (st_join uses st_intersects logic by default which returns all overlapping rows). I updated to take the midpoint of each COMID line segment and use that to drive the join, that way there's only one matching value per COMID.

MaddeeRubenson commented 7 months ago

@MaddeeRubenson The output tables had more rows than the number of COMIDs (total should be 178,868 rows). Some COMIDs were getting duplicated because the line segment overlapped multiple catchment polygons (st_join uses st_intersects logic by default which returns all overlapping rows). I updated to take the midpoint of each COMID line segment and use that to drive the join, that way there's only one matching value per COMID.

Thanks Skyler! good catch.