Skip to content

allow for geojson to be piped through the cli to specify AOI #1

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

Merged
merged 2 commits into from
Jun 11, 2015

Conversation

kapadia
Copy link
Contributor

@kapadia kapadia commented Jun 11, 2015

@ischneider this allows geojson to be piped through the command line when searching the metadata endpoint. I'm also suggesting the cli use dashes rather than underscores. I believe this is more common. I do use this format in https://github.com/mapbox/usgs

$ cat aoi.geojson | planet get-scenes-list | jq ""

{
  "count": 9877,
  "type": "FeatureCollection",
  "features": [
    {
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              -73.21064797294268,
              -37.31639497428449
            ],
            [
              -73.24541583060468,
              -37.21346042714025
            ],
            [
              -73.44103978590277,
              -37.253119844212655
            ],
            [
              -73.40622309866201,
              -37.35652688459598
            ],
            [
              -73.21064797294268,
              -37.31639497428449
            ]
          ]
        ]
      },
      "type": "Feature",
      "id": "20150610_160800_0906",
      "properties": {
        "links": {
          "self": "https://api.planet.com/v0/scenes/ortho/20150610_160800_0906",
          "full": "https://view.planet.com/v0/scenes/ortho/20150610_160800_0906/full",
          "square_thumbnail": "https://view.planet.com/v0/scenes/ortho/20150610_160800_0906/square-thumb",
          "thumbnail": "https://view.planet.com/v0/scenes/ortho/20150610_160800_0906/thumb"
....

@kapadia
Copy link
Contributor Author

kapadia commented Jun 11, 2015

Documenting this workflow here for now. Suppose you want all planet scene ids that intersect a given Landsat scene:

$ usgs metadata --node EE LANDSAT_8 LC82290852015160LGN00 --geojson | planet get-scenes-list | jq ".features[].id"

kapadia added a commit that referenced this pull request Jun 11, 2015
allow for geojson to be piped through the cli to specify AOI. also accepts scene ids from stdin when downloading thumbnails.
@kapadia kapadia merged commit 19d9bd0 into master Jun 11, 2015
@kapadia kapadia deleted the pipe-geojson branch June 11, 2015 23:57
@ischneider
Copy link
Member

@kapadia thanks!

carl-adams-planet added a commit that referenced this pull request Jun 25, 2025
fix incorrect search_filter arg in Data API documentation example (#1
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

Successfully merging this pull request may close these issues.

2 participants