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

requests.get() on GeoJSON URL not completed #40

Open
zoometh opened this issue Nov 14, 2023 · 1 comment
Open

requests.get() on GeoJSON URL not completed #40

zoometh opened this issue Nov 14, 2023 · 1 comment

Comments

@zoometh
Copy link
Member

zoometh commented Nov 14, 2023

Running request.get() on few GeoJSON urls taks a long time, even do not complet, for example:

GEOJSON_URL = "https://database.eamena.org/api/search/export_results?paging-filter=1&tiles=true&format=geojson&reportlink=false&precision=6&total=90&advanced-search=%5B%7B%22op%22%3A%22and%22%2C%2234cfea78-c2c0-11ea-9026-02e7594ce0a0%22%3A%7B%22op%22%3A%22~%22%2C%22lang%22%3A%22en%22%2C%22val%22%3A%22Sistan%22%7D%2C%2234cfea87-c2c0-11ea-9026-02e7594ce0a0%22%3A%7B%22op%22%3A%22%22%2C%22val%22%3A%22e6e6abc5-3470-45c0-880e-8b29959672d2%22%7D%7D%2C%7B%22op%22%3A%22and%22%2C%2234cfea81-c2c0-11ea-9026-02e7594ce0a0%22%3A%7B%22op%22%3A%22lt%22%2C%22val%22%3A%222021-07-01%22%7D%2C%2234cfea4d-c2c0-11ea-9026-02e7594ce0a0%22%3A%7B%22op%22%3A%22%22%2C%22val%22%3A%22%22%7D%2C%22d2e1ab96-cc05-11ea-a292-02e7594ce0a0%22%3A%7B%22op%22%3A%22%22%2C%22val%22%3A%22%22%7D%2C%2234cfea8a-c2c0-11ea-9026-02e7594ce0a0%22%3A%7B%22op%22%3A%22%22%2C%22val%22%3A%22%22%7D%7D%5D&resource-type-filter=%5B%7B%22graphid%22%3A%2234cfe98e-c2c0-11ea-9026-02e7594ce0a0%22%2C%22name%22%3A%22Heritage%20Place%22%2C%22inverted%22%3Afalse%7D%5D"
resp = requests.get(GEOJSON_URL)
data = resp.json()

It is not linked to the size/number of HP to retrieve (here 90 ..total=90..)

@zoometh
Copy link
Member Author

zoometh commented Feb 1, 2024

This issue is related with the Arches/EAMENA API and/or Python requests.get().

  1. There are 89 HP on the API (which is OK),

image

  1. but the GET collect much more (> 20,000)

image

Obviously, a copy/paste of 1 (the API) works

url = "https://raw.githubusercontent.com/eamena-project/eamena-arches-dev/main/projects/sistan/examples/sample_2.json"
resp = requests.get(url)
data = resp.json()
len(data['features'])

image

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