My Goal: I want to get info from polygon. I mean I want to draw a lot of points (locations: latitude and longitude) and I want to make a polygon with these points (locations: latitude and longitude)and I want to get all information from iNat API about this polygon (locations: latitude and longitude)
For example, I can do this thing: https://api.inaturalist.org/v1/observations?nelat=59.84557713015031&nelng=30.21625827924274&place_id=any&subview=map&swlat=59.84409500096111&swlng=30.208108655633826 and I will have information from rectangle (4 coordinates with latitude and longitude). But I’d like to get info from any polygon (I mean I don’t want to have this information from only rectangle with 4 coordinates)
For example, I have 10 location points (I don’t want to use rectangle with 4 coordinates), and I want to make the polygon from this points and get all information with iNat API.
Problem: I know how to solve task but I don’t like my idea.
My solution: . I do the polygon, for example, with 10 locations (latitude and longitude). Then I do a rectangle and size my rectangle is bigger than my polygon (I mean polygon is inside this rectangle on iNat Map). After that I get all information from rectangle with iNat API and check every point (observation with latitude and longitude) inside rectangle if this point (observation with latitude and longitude) inside the polygon. I save all points (observations with latitude and longitude) inside polygon and I ignore all points (observations with latitude and longitude) that are outside the polygon but inside the rectangle.
It will work, but I don’t like this path. It’s too long, it’s not beautiful. Is it possible to do this task faster?