I am trying to identify the set of polygons (census tracts) that intersect another polygon (a police district). When I use the st_intersects function, I get all the polygons I expect but also a bunch of polygons on the outside the border. (In the example below, the green polygons are tracts, the red outline is the police district and the polygon labeled A is an example of a tract that st_intersect is including but I would like to exclude).
Similarly, if I use st_overlaps I get tracts that are both on the border outside (A) and inside (B) the district.
Finally, if I use st_contains, I don't get any tracts that border the district boundary, but this excludes tracts (like B above) that I would like to include.
Is there a way to select just those tracts that are contained within the police district but exclude those outside the border? Could I, for example, shrink the police district somehow so that the outside tracts don't touch the police district boundary at all? Or is there better way to achieve what I'm trying to do?
st_within
?