0

I'm trying to search and then download clips of some shots across California, but am running into an issue. It's potentially the same issue as Assets not available via API, but that question doesn't have enough detail for me to know.

Using the API, I cannot get an image IDs for images in california that I can otherwise download with /explorer, for example item 20171218_181808_102f. I can get image IDs when I query the REOrthoTile item type, but the search API returns empty feature arrays for PSOrthoTile, PSScene4Band, or PSScene3Band queries, both analytic and visual. I think my permissions should let me access the other item types since it's in california. I checked my filters to make sure it matches my /explorer query, and I think it's the same.

Can you help me figure out what's going on?

My search request for PSScene4Band returns something like this:

{'_links': {'_first': 'https://api.planet.com/data/v1/searches/b0acb989064a4c5fa5da0b13c86c07a3/results?_page=eyJxdWVyeV9wYXJhbXMiOiB7fSwgInNvcnRfcHJldiI6IGZhbHNlLCAicGFnZV9zaXplIjogMjUwLCAic29ydF9ieSI6ICJwdWJsaXNoZWQiLCAic29ydF9zdGFydCI6IG51bGwsICJzb3J0X2xhc3RfaWQiOiBudWxsLCAic29ydF9kZXNjIjogdHJ1ZX0%3D', '_next': None, '_self': 'https://api.planet.com/data/v1/searches/b0acb989064a4c5fa5da0b13c86c07a3/results?_page=eyJxdWVyeV9wYXJhbXMiOiB7fSwgInNvcnRfcHJldiI6IGZhbHNlLCAicGFnZV9zaXplIjogMjUwLCAic29ydF9ieSI6ICJwdWJsaXNoZWQiLCAic29ydF9zdGFydCI6IG51bGwsICJzb3J0X2xhc3RfaWQiOiBudWxsLCAic29ydF9kZXNjIjogdHJ1ZX0%3D'}, 'features': [], 'type': 'FeatureCollection'}

Searching for REOrthoTile gets me a big features array filled with stuff, including the id key that I'm looking for.

Here's the search code:

https://github.com/earthmancash2/planet-satellite-fetching/blob/master/planet_image_fetching.py#L95-L148

https://github.com/earthmancash2/planet-satellite-fetching/blob/master/PlanetAPIParams.py

Any ideas for what is happening?

2

I did not trace completely through your code, but I see an implication that usable_data is part of your query. I do not believe that the usable_data field is being set to a non-zero value currently for at least some PlanetScope products (see https://api.planet.com/data/v1/item-types/PSScene3Band/items/20171218_181808_102f for instance). I would suggest dropping the usable_data clause from your query.

In the future it might be helpful to include the final query url you issue in your question.

1
  • This fixed it, thank you for finding that extra filter in my query code. I will make sure to print the full API call in the future for questions like this. – Chetan Sharma Jan 4 '18 at 23:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.