Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtering on Latitude and Longitude #9

Open
ani8897 opened this issue Oct 22, 2019 · 0 comments
Open

Filtering on Latitude and Longitude #9

ani8897 opened this issue Oct 22, 2019 · 0 comments

Comments

@ani8897
Copy link

ani8897 commented Oct 22, 2019

I am trying to filter nodes in a specific region. The following code in Python does not do the job. What am I missing here, or is it a bug in the endpoint?

import geojson
from geojson import Feature, Polygon
from aot_client import F, AotClient

crs_dict = {
    "type": "name", 
    "properties": {
        "name": "EPSG:4326"
    }
}

client, f= AotClient(), F()

poly = [[(-87.613686,41.867541),(-87.442550,41.622690), (-87.710244, 41.851536), (-87.717186,41.894986), (-87.613686,41.867541)]]
region_of_interest = Feature(geometry=Polygon(poly, crs=crs_dict))
print(region_of_interest)

f &= ('location', 'within', region_of_interest)
response = client.list_nodes(filters=f)
print(response.data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant