I'm trying to be able to calculate whether a coordinate is within a census tract. As an example, here's a particular census tract in Chicago defined as a set of polygon vertices:
coords = Uncompress[FromCharacterCode[
Flatten[ImageData[Import["https://i.stack.imgur.com/fIe9F.png"],"Byte"]]]]
You can see the rough shape of the tract with Graphics[Polygon[GeoPosition[coords]]]
.
I was hoping one of the following would tell me whether a coordinate was in the tract:
RegionMember[GeoPosition[coords], {41.7284, -87.741}]
RegionMember[Polygon[GeoPosition[coords]], {41.7284, -87.741}]
But both complain of improperly specified regions. Any ideas?
FWIW: I hope to eventually be numerically integrating over the map. For each point in the numerical integration, I'll need to find the census tract to which it belongs. So this could get a bit dicey if I'm computationally inefficient.