stactools-packages / planet

stactools package for working with Planet data
Other
3 stars 1 forks source link

Add `convert-search` operation #18

Open cholmes opened 2 years ago

cholmes commented 2 years ago

Planet has two API's that benefit from STAC - orders api (which this tool supports, and which recently started supporting stac 'natively') and data api. It'd be great to have an operation which takes the output of the data api and converts it to STAC.

This would have less fields that convert-order, since some of the order outputs (like making thumbnails, projection for some of the item-types) depend on having the item there. And they wouldn't have asset links, since the assets don't exist unless 'activated' (though it could be interested to see if the order extension might be a way to expose the activation links or orders API).

A main goal would be to allow a piping of the output of a Planet data API response to this tool, to then be able to tap into the stac ecosystem (like stac-terminal). This would likely be done in conjunction with the Planet CLI - planet data search filter.json | stac planet convert-search -. It'd also be good to have a clear python API call, so that the Planet CLI could have the option to pull this library in and offer a CLI operation directly, like planet data to-stac or something like that.

cholmes commented 2 years ago

One thing to be sure of is to properly link to the thumbnail, including it as an asset, using the Planet thumb service, see https://developers.planet.com/docs/apis/data/item-previews/

One nice win would be to include 'links' to the XYZ tiles as well, see https://developers.planet.com/docs/basemaps/tile-services/#api-tile-service. See https://github.com/stac-extensions/web-map-links for the current stac way to do it. And the other good 'link' would be to Planet Explorer showing the item.

If that's there then it could then be really nice to have some utility method that would elevate or duplicate links to tile services to the 'properties', so that tools like kepler and qgis would show the link to the tile services and explorer.