walkerke / tigris

Download and use Census TIGER/Line shapefiles in R
Other
324 stars 45 forks source link

`erase_water()` should return `input_sf` if there is no overlap w/ water area #172

Open elipousson opened 1 year ago

elipousson commented 1 year ago

While trying to use erase_water() on a subset of tracts for an area, I realized that it returns an empty data frame if there is no overlapping water area. I just implemented a fix on my fork that I think also may improve performance for erase_water() since it incorporates the filter_by parameter when calling tigris::counties().

I'm optimistic this will be a welcome change so I'll go ahead and open a pull request for review.

walkerke commented 1 year ago

Thank you! I'll take a look at this. I wonder if this is an issue on the Python side as well, I'll have to take a look.