Giter Site home page Giter Site logo

samapriya / planet-gee-pipeline-cli Goto Github PK

View Code? Open in Web Editor NEW
42.0 6.0 12.0 8.02 MB

Planet and Google Earth Engine Pipeline Command Line Interface Tool

Home Page: https://pypi.org/project/ppipe/

License: Apache License 2.0

Python 100.00%
planet earth-engine planet-api cli

planet-gee-pipeline-cli's Introduction

Planet GEE Pipeline CLI

PyPI version Build Status DOI Planet Say Thanks!

This tool is designed to facilitate moving data from Planet's API into Google Earth Engine and using a metadata library. The tool downloads data into a local storage and allows you to process the metadata before uploading into Google Earth Engine. This tool has been updated to account for metadata property type by going through each metadata column and then uses the upload manifest function to upload images for ingestion to EE. This tool also draws from an additional tool I created with is the Google Earth Engine Asset Manager Addon This includes the batch upload feature, but now additional tools such as generating reports of Earth Engine assets and querying quota to name just a few. The ambition is apart from helping users with batch actions on assets along with interacting and extending capabilities of existing GEE CLI. It is developed case by case basis to include more features in the future as it becomes available or as the need arises. I have now released this as a PyPI package for easy installation and this will be updated along with the the GitHub package.

Though this tool is designed to download planet imagery, use porder to use the new ordersv2 API to download planet imagery. This includes additional filter capabilities along with capability to clip and download.

Please note: This tool is in no way an official tool or Planet offering, but is a personal project created and maintained by Samapriya Roy

If you use this tool to download data for your research, and find this tool useful, star and cite it as below

Samapriya Roy. (2019, October 10). samapriya/Planet-GEE-Pipeline-CLI: Planet-GEE-Pipeline-CLI (Version 0.4.8). Zenodo.
http://doi.org/10.5281/zenodo.3479525

Table of contents

Installation

This assumes that you have native python & pip installed in your system, you can test this by going to the terminal (or windows command prompt) and trying

python and then pip list

If you get no errors and you have python 2.7.14 or higher you should be good to go. Please note that I have released this as a python 2.7 but can be easily modified for python 3.

Make sure you install OpenSSL from this page

This toolbox also uses some functionality from GDAL For installing GDAL in Ubuntu

sudo add-apt-repository ppa:ubuntugis/ppa && sudo apt-get update
sudo apt-get install gdal-bin
sudo apt-get install python-gdal

For Windows I found this guide from UCLA

To install Planet-GEE-Pipeline-CLI: You can install using two methods

pip install ppipe

or you can also try

git clone https://github.com/samapriya/Planet-GEE-Pipeline-CLI.git
cd Planet-GEE-Pipeline-CLI
python setup.py install

For linux use sudo. This release also contains a windows installer which bypasses the need for you to have admin permission, it does however require you to have python in the system path meaning when you open up command prompt you should be able to type python and start it within the command prompt window. Post installation using the installer you can just call ppipe using the command prompt similar to calling python. Give it a go post installation type

ppipe -h

Installation is an optional step; the application can be also run directly by executing ppipe.py script. The advantage of having it installed is being able to execute ppipe as any command line tool. I recommend installation within virtual environment. If you don't want to install, browse into the ppipe folder and try python ppipe.py to get to the same result.

Getting started

As usual, to print help:

> ppipe -h
usage: ppipe [-h]
             {
             ,planetkey,pquota,dasync,savedsearch,metadata,update,selsetup,ee_user,quota,create,selupload,lst,assetsize,tasks,access,ca
             ...

Planet Pipeline with Google Earth Engine Batch Addons

positional arguments:
  { ,planetkey,pquota,dasync,savedsearch,metadata,update,selsetup,ee_user,quota,create,selupload,lst,assetsize,tasks,access,cancel}
                        ---------------------------------------
                        -----Choose from Planet Tools Below-----
                        ---------------------------------------
    planetkey           Enter your planet API Key
    pquota              Prints your Planet Quota Details
    dasync              Uses the Planet Client Async Downloader to download
                        Planet Assets: Does not require activation
    savedsearch         Tool to download saved searches from Planet Explorer
    metadata            Tool to tabulate and convert all metadata files from
                        Planet or Digital Globe Assets
                        -------------------------------------------
                        ----Choose from Earth Engine Tools Below----
                        -------------------------------------------
    update              Updates Selenium drivers for firefox
    selsetup            Non headless setup for new google account, use if
                        upload throws errors
    ee_user             Get Earth Engine API Key & Paste it back to Command
                        line/shell to change user
    quota               Print Earth Engine total quota and used quota
    create              Allows the user to create an asset collection or
                        folder in Google Earth Engine
    selupload           Batch Asset Uploader for Planet Items & Assets using
                        Selenium
    lst                 List assets in a folder/collection or write as text
                        file
    assetsize           Prints collection size in Human Readable form & Number
                        of assets
    tasks               Queries current task status
                        [completed,running,ready,failed,cancelled]
    access              Sets Permissions for items in folder
    cancel              Cancel all running tasks

optional arguments:
  -h, --help            show this help message and exit

To obtain help for a specific functionality, simply call it with help switch, e.g.: ppipe upload -h. If you didn't install ppipe, then you can run it just by going to ppipe directory and running python ppipe.py [arguments go here]

Usage examples

Usage examples have been segmented into two parts focusing on both planet tools as well as earth engine tools, earth engine tools include additional developments in CLI which allows you to recursively interact with their python API

Planet Tools

The Planet Toolsets consists of tools required to access control and download planet labs assets (PlanetScope and RapidEye OrthoTiles) as well as parse metadata in a tabular form which maybe required by other applications.

Planet Key

This tool basically asks you to input your Planet API Key using a password prompt this is then used for all subsequent tools. This tool now includes an option for a quiet authentication using the API key incase it is unable to invoke an interactive environment such as in Google colaboratory. You can also perform planet init to set the key as the tool can read from it directly.

usage: ppipe planetkey [-h] [--type TYPE] [--key KEY]

optional arguments:
  -h, --help   show this help message and exit

Optional named arguments:
  --type TYPE  For direct key entry type --type quiet
  --key KEY    Your Planet API Key

If using on a private machine the Key is saved as a csv file for all future runs of the tool.

Planet Quota

This tool prints your Planet quota including allocation name, Total quota, quota used and quota remaining. Calling it is simple

ppipe pquota

Download Async

This tool is built as a wrapper around the Planet Client's own download tool. The tool included in the planet client is multithreaded and allows the user to activate, poll and download at the same time. This will allow you to pass geometry in terms of a geojson files or all filter like start and end date and time using the .json files you created using the aoijson tool earlier.

usage: ppipe dasync [-h] [--infile INFILE] [--item ITEM] [--asset ASSET]
                       [--local LOCAL] [--start START] [--end END]
                       [--cmin CMIN] [--cmax CMAX]

optional arguments:
  -h, --help       show this help message and exit
  --infile INFILE  Choose a geojson from geojson.io or the aoi-json you
                   created earlier using ppipe aoijson
  --item ITEM      Choose from Planet Item types Example: PSScene4Band,
                   PSOrthoTile, REOrthoTile etc
  --asset ASSET    Choose an asset type example: anlaytic,
                   analytic_dn,analytic_sr,analytic_xml etc
  --local LOCAL    Local Path where Planet Item and asset types are saved

Optional named arguments:
  --start START    Start date filter format YYYY-MM-DD
  --end END        End date filter format YYYY-MM-DD
  --cmin CMIN      Cloud cover minimum between 0-1
  --cmax CMAX      Cloud cover maximum between 0-1

A setup using geojson needs to include other filters too and a typical setup would be

ppipe dasync --infile "C:\Users\johndoe\geometry.geojson" --item "PSScene4Band" --asset "analytic" --local "C:\planet" --start "2018-06-01" --end "2018-08-01" --cmin 0 --cmax 0.4

Using a stuctured json file that you might have created earlier means you don't have to pass additional filters everytime

python ppipe.py dasync --infile "C:\Users\johndoe\geometry.json" --item "PSScene4Band" --asset "analytic_xml" --local "C:\planet_demo"

However, you can still decide to pass the filters and the filters you pass will overwrite existing filters

python ppipe.py dasync --infile "C:\Users\johndoe\geometry.json" --item "PSScene4Band" --asset "analytic_xml" --local "C:\planet_demo" --start "2018-06-01" --end "2018-08-01" --cmin "0" --cmax 0.4

Download Saved Searches

Download assets from saved searches which are saved in your planet explorer.

usage: ppipe savedsearch [-h] [--name NAME] [--asset ASSET] [--local LOCAL]
                         [--limit LIMIT]

optional arguments:
  -h, --help     show this help message and exit
  --name NAME    Name of your saved search(It is case sensitive)
  --asset ASSET  Choose asset type analytic, analytic_xml, analytic_sr,
                 analytic_dn etc
  --local LOCAL  Local Path (full path address) where PlanetAssets are saved

Optional named arguments:
  --limit LIMIT  Choose number of assets you want to download

Metadata Parser

The metadata tab is a more powerful tool and consists of metadata parsing for All PlanetScope and RapiEye Assets along with Digital Globe MultiSpectral and DigitalGlobe PanChromatic datasets. This was developed as a standalone to process xml metadata files from multiple sources and is important step is the user plans to upload these assets to Google Earth Engine.

usage: ppipe metadata [-h] [--asset ASSET] [--mf MF] [--mfile MFILE]
                      [--errorlog ERRORLOG] [--dir DIR]

optional arguments:
  -h, --help           show this help message and exit
  --asset ASSET        Choose PS OrthoTile(PSO)|PS OrthoTile DN(PSO_DN)|PS
                       OrthoTile Visual(PSO_V)|PS4Band Analytic(PS4B)|PS4Band
                       DN(PS4B_DN)|PS4Band SR(PS4B_SR)|PS3Band
                       Analytic(PS3B)|PS3Band DN(PS3B_DN)|PS3Band
                       Visual(PS3B_V)|RE OrthoTile (REO)|RE OrthoTile
                       Visual(REO_V)|DigitalGlobe
                       MultiSpectral(DGMS)|DigitalGlobe
                       Panchromatic(DGP)|PolarGeospatial CenterDEM
                       Strip(PGCDEM)?
  --mf MF              Metadata folder?
  --mfile MFILE        Metadata filename to be exported along with Path.csv
  --errorlog ERRORLOG  Errorlog to be exported along with Path.csv

Optional named arguments:
  --dir DIR            Path to Image Directory to be used to get ImageTags
                       with metadata. use only with PS4B_SR

Earth Engine Tools

The ambition is apart from helping user with batch actions on assets along with interacting and extending capabilities of existing GEE CLI. It is developed case by case basis to include more features in the future as it becomes available or as need arises. This is also a seperate package for earth engine users to use and can be downloaded here

selenium update

This is a key step since all upload function depends on this step, so make sure you run this. This downloads selenium driver and places to your local directory for windows and Linux subsystems. This is the first step to use selenium supported upload.

ppipe update

gee selsetup

Once in a while the geckodriver requires manual input before signing into the google earth engine, this tool will allow you to interact with the initialization of Google Earth Engine code editor window. It allows the user to specify the account they want to use, and should only be needed once.

geeup selsetup

EE User

This tool is designed to allow different users to change earth engine authentication credentials. The tool invokes the authentication call and copies the authentication key verification website to the clipboard which can then be pasted onto a browser and the generated key can be pasted back. This command takes in no arguments.

ppipe ee_user

EE Quota

This tool prints earthengine quota tools, used and remaining quota. No argument is required

ppipe quota

Create

This tool allows you to create a collection or folder in your earth engine root directory. The tool uses the system cli to achieve this and this has been included so as to reduce the need to switch between multiple tools and CLI.

usage: ppipe.py create [-h] --typ TYP --path PATH

optional arguments:
  -h, --help   show this help message and exit
  --typ TYP    Specify type: collection or folder
  --path PATH  This is the path for the earth engine asset to be created full
               path is needsed eg: users/johndoe/collection

Batch uploader

The script creates an Image Collection from GeoTIFFs in your local directory. By default, the image name in the collection is the same as the local directory name; with the optional parameter you can provide a different name.You have to process the metadata for images, which is covered in the next section along with a manifest type for Planet image and asset: Metadata parser.

usage: ppipe selupload [-h] --source SOURCE --dest DEST [-m METADATA]
                          [--large] [--nodata NODATA] [--bands BANDS]
                          [-u USER] [-b BUCKET]

optional arguments:
  -h, --help            show this help message and exit

Required named arguments.:
  --source SOURCE       Path to the directory with images for upload.
  --dest DEST           Destination. Full path for upload to Google Earth
                        Engine, e.g. users/pinkiepie/myponycollection
  -u USER, --user USER  Google account name (gmail address).

Optional named arguments:
  -m METADATA, --metadata METADATA
                        Path to CSV with metadata.
  --large               (Advanced) Use multipart upload. Might help if upload
                        of large files is failing on some systems. Might cause
                        other issues.
  --nodata NODATA       The value to burn into the raster as NoData (missing
                        data)
  --bands BANDS         Comma-separated list of names to use for the image
                        bands. Spacesor other special characters are not
                        allowed.
  -b BUCKET, --bucket BUCKET
                        Google Cloud Storage bucket name.

Asset List

This tool is designed to either print or output asset lists within folders or collections using earthengine ls tool functions.

usage: ppipe lst [-h] --location LOCATION --typ TYP [--items ITEMS]
                 [--output OUTPUT]

optional arguments:
  -h, --help           show this help message and exit

Required named arguments.:
  --location LOCATION  This it the location of your folder/collection
  --typ TYP            Whether you want the list to be printed or output as
                       text[print/report]

Optional named arguments:
  --items ITEMS        Number of items to list
  --output OUTPUT      Folder location for report to be exported

Asset Size

This tool allows you to query the size of any Earth Engine asset[Images, Image Collections, Tables and Folders] and prints out the number of assets and total asset size in non-byte encoding meaning KB, MB, GB, TB depending on size.

usage: ppipe assetsize [-h] --asset ASSET

optional arguments:
  -h, --help     show this help message and exit
  --asset ASSET  Earth Engine Asset for which to get size properties

Task Query

This script counts all currently running,ready,completed,failed and cancelled tasks along with failed tasks. This is linked to the account you initialized with your google earth engine account. This takes no argument.

usage: ppipe.py tasks [-h]

optional arguments:
  -h, --help  show this help message and exit

ppipe.py tasks

Assets Access

This tool allows you to set asset acess for either folder , collection or image recursively meaning you can add collection access properties for multiple assets at the same time.

usage: ppipe.py access [-h] --asset ASSET --user USER --role ROLE

optional arguments:
  -h, --help     show this help message and exit
  --asset ASSET  This is the path to the earth engine asset whose permission
                 you are changing folder/collection/image
  --user USER    Full email address of the user, try using "AllUsers" to make
                 it public
  --role ROLE    Choose between reader, writer or delete

Cancel all tasks

This is a simpler tool, can be called directly from the earthengine cli as well

earthengine cli command
earthengine task cancel all

Usage using this tool

usage: ppipe cancel [-h]

optional arguments:
  -h, --help  show this help message and exit

Credits

JetStream A portion of the work is suported by JetStream Grant TG-GEO160014.

Also supported by Planet Labs Ambassador Program

Original upload function adapted from Lukasz's asset manager tool

Changelog

v0.4.9

  • fixed issue with selsetup

v0.4.8

  • fixed raw_input vs input for py2 and py3 cases
  • updated selenium setup path for windows vs other operating systems

v0.4.7

  • Download selenium drivers for all operating systems
  • updated asset size, acl changer and other tools
  • fixed metadata tool to work with python3
  • overall general improvements to the tool and updates
  • added selenium setup tools

v0.4.6

  • added fix for downloading selenium drivers
  • improved error handling

v0.4.4

  • Fixed selenium download path
  • Streamlined overall functions of the tool
  • Handles metadata for clipped assets (use porder to clip)
  • Updated selenium uploader to function with earthengine-api
  • Overall improvements and stability check

v0.4.3

  • Added selenium uploader to upload images to Earth Engine after auth issues
  • Overall improvements to the tools and added notifications and contribution notices

v0.4.1

  • Major improvements to earth engine tools including better task reporting, batch copy and move
  • Improvement to the access tool which allows you to add read/write permissions for entire EE folder and collections for specific users

v0.3.8

  • Now include a tool to print your planet quota details pquota
  • Tool includes dasync which uses the Planet's Python Client Downloader to activate, download using multithreading

v0.3.7

  • Now allows users to download from saved searches in planet explorer

v0.3.6

  • Now handles complex geometry by using a bounding box for GeoJSON files

v0.3.5

  • Fixed issues with space function
  • Improved file size parsing

v0.3.2

  • Generalized CLI arguments
  • Fixed subprocess shell issue for upload

v0.3.0

  • Allows for quiet authentication for use in Google Colab or non interactive environments
  • Improved planet key entry and authentication protocols

v0.2.91

  • Fixed issue with Surface Reflectance metadata and manifest lib
  • Improved ingestion support for (PSScene4Band analytic_Sr)[PS4B_SR]

v0.2.9

  • Fixed issues with generating id list
  • Improved overall security of command calls

v0.2.2

  • Major improvements to ingestion using manifest ingest in Google Earth Engine
  • Contains manifest for all commonly used Planet Data item and asset combinations
  • Added additional tool to Earth Engine Enhancement including quota check before upload to GEE

v0.2.1

  • Fixed initialization loop issue

v0.2.0

  • Metadata parser and Uploader Can now handle PlanetScope 4 Band Surface Reflectance Datasets
  • General Improvements

v0.1.9

  • Changes made to reflect updated GEE Addon tools
  • general improvements

v0.1.8

  • Minor fixes to parser and general improvements
  • Planet Key is now stored in a configuration folder which is safer "C:\users.config\planet"
  • Earth Engine now requires you to assign a field type for metadata meaning an alphanumeric column like satID cannot also have numeric values unless specified explicitly . Manifest option has been added to handle this (just use -mf "planetscope")
  • Added capability to query download size and local disk capacity before downloading planet assets.
  • Added the list function to generate list of collections or folders including reports
  • Added the collection size tool which allows you to estimate total size or quota used from your allocated quota.
  • ogr2ft feature is removed since Earth Engine now allows vector and table uploading.

planet-gee-pipeline-cli's People

Contributors

dependabot[bot] avatar samapriya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

planet-gee-pipeline-cli's Issues

Google Earth Engine integration breaks your tool

I've been trying your guide https://medium.com/planet-stories/planet-people-and-pixels-a-data-pipeline-to-link-planet-api-to-google-earth-engine-1166606445a8

Traceback (most recent call last):
  File "ppipe.py", line 12, in <module>
    from taskreport import genreport
  File "/home/XX/ppipe/taskreport.py", line 8, in <module>
    ee.Initialize()
  File "/usr/lib/python3.6/site-packages/ee/__init__.py", line 93, in Initialize
    ApiFunction.initialize()
  File "/usr/lib/python3.6/site-packages/ee/apifunction.py", line 151, in initialize
    signatures = data.getAlgorithms()
  File "/usr/lib/python3.6/site-packages/ee/data.py", line 426, in getAlgorithms
    return send_('/algorithms', {}, 'GET')
  File "/usr/lib/python3.6/site-packages/ee/data.py", line 837, in send_
    response.status)
ee.ee_exception.EEException: Server returned HTTP code: 404

I HAVE authorized Google EE with my code 4/AADDvi8WDdQuv3M9hn9lv8WsypAoQKSu5XfYG1i1W_exKoTClCBOJvk

ppipe update error

ppipe update getting the following error

Traceback (most recent call last):
File "sel-latest-linux.py", line 2, in
import requests, csv, zipfile, os, platform, tarfile
ImportError: No module named requests

Limit number of assets for activation/downloading

Hello,

Great tool. I skimmed through the documentation but did not manage to find a flag to specify the number of items to activate or download. I have a daily quota of images so it would be great if the application has it.

Ppipe error for multiple geometries

The tool breaks and returns
Error code 400: {"field": {}, "general": [{"message": "unknown issue with search geometry"}]}
if the geojson has more than one feature. A clearer error message would be helpful, if not possible to have two or more polygons in the AOI filter

Tool does not work on Google Colab

Hi Sam - thanks for making this tool!
I am trying to use it on a Google Colab and I get an error

%%bash
export PL_API_KEY=I-have-my-key-here
cd Planet-GEE-Pipeline-CLI/ppipe
python ppipe.py -h

Traceback (most recent call last):
File "ppipe.py", line 20, in
from idlst import idl
File "/content/Planet-GEE-Pipeline-CLI/ppipe/idlst.py", line 14, in
PL_API_KEY = read_planet_json()['key']
KeyError: 'key'

I think the error originate in line 14 of idlst.py . I don't have the key as a .planet.json on the (temporary) VM. I am not sure why you don't use find_api_key() from planet.api.auth instead, which will check for PL_API_KEY first, and if not found try open the same json file ?

Cheers
Guy

Uploading UDM2 asset to GEE - no metadata?

Hey Sam,

I want to upload the Usable Data Mask .tif file associated with each PlanetScope Orthotile but I'm receiving an error that says "no metadata exists for image "xxxx" it will not be ingested". Now I was able to successfully upload the PSO files after updating to version 0.4.5, but I am confused on how I can upload the UDM2 assets if ppipe doesn't recognize the xml file associated with it. The UDM2 asset is essential for masking clouds, shadows, and other features, as I'm sure you know.

Thanks,
Josh

Error when using ppipe update: "Issues updating with error HTTP Error 404: Not Found"

Hello,

Thank you so much for this fantastic code. I think there is a problem with ppipe update: the error I get when I try to call it is:

Downloading from: https://github.com/mozilla/geckodriver/releases/download/0.27.0/geckodriver-0.27.0-win64.zip
Issues updating with error HTTP Error 404: Not Found

I looked at the geckodriver git page and it looks like the correct link to download geckodriver is currently (note the v's):
https://github.com/mozilla/geckodriver/releases/download/v0.27.0/geckodriver-v0.27.0-win64.zip

selupload does not function with PSOrthotiles and metadata

I think it's similar to the last issue "metadata file produced from files downloaded with the clip option of the old planet API aren't correct to use"

When I batch download PSOrthotiles the id names in the metadata file will be something like "1539866_0466621_2018-07-02_1105_BGRN_Analytic_metadata" which means that it won't upload properly when using selupload. I fixed my problem by just clipping the "_metadata" off in cli_metadata.py near line 88.

writer.writerow([filename.split('.')[0].replace('_metadata',''),epoch,productType,orbit,provider,instrument,satellite_id,tile_id,bands,epsg_code,resampling_kernel.....

This is super specific to my case though. I know Planet uses annoyingly different naming conventions across the board, so this would be tedious to find all these cases.

Would it worth doing something like: metadata_sfx = filename.split('.')[0].split('_')[-1] and checking against a list of common suffixes, then replacing with the empty string if it is in the list?

I could also see queries being done against the metadata dictionary (near line 15 of metadata_ingest.py ) to accommodate the fact that filename is likely just a substring of a metadata key. But you read from the metadata csv a few times in that file so that might not be enough.

Problem with ppipe space

When running
!ppipe space --aoi "/content/map (1)_aoi.json" --asset "PSScene4Band analytic" --local "/content/planet"
I get an error
sh: 1: Syntax error: "(" unexpected

while if I use
!ppipe space --aoi "'/content/map (1)_aoi.json'" --asset "PSScene4Band analytic" --local "/content/planet"
it works fine. Other ppipe commands e.g. ppipe activatepl did not have that problem - in fact using "'/content/map (1)_aoi.json'" files for these while "/content/map (1)_aoi.json" works

ImportError: No module named oauth2client.client

the installation went ok, after the installation of (Microsoft Visual C++ Compiler for Python 2.7) but, when I run the command, ppipe -h, the error stated in the issue name appear.

i have tried,

pip install oauth2client.client

and it gave the following error

Collecting oauth2client.client Could not find a version that satisfies the requirement oauth2client.client (from versions: ) No matching distribution found for oauth2client.client

i have tried also with python 3 and no luck.

thanks

ppipe space missing arguments

I am running
!ppipe space --aoi "/content/map_aoi.json" --asset "PSScene4Band analytic_sr" --local "/content/planet"

which should work based on
!ppipe space -h

but I get:
usage: download.py [-h] [--idlist IDLIST] [--query QUERY] [--search]
[--bbox XMIN YMIN XMAX YMAX] [--activate] [--check]
[--size SIZE] [--download DOWNLOAD] [--overwrite]
[--start-date START_DATE] [--end-date END_DATE]
[--satlist SATLIST] [--sats [SATS [SATS ...]]] [--key KEY]
[--debug]
item asset
download.py: error: too few arguments

unable to load imagecollection

I' m trying to upload a folder with RAPIDEYE downloaded from planet.
First,
I can't produce the metadata.csv file yet. I don't understand if this work with previously downloaded images or just with the one i' m about to download.
Second,
atempting to upload the folder with images to an imagecollection,

C:\Users\javie>ppipe selupload --source C:\Users\javie\bichadero --dest users/javiermoreira/UBA/bichadero -u [email protected] 2019-02-08 16:25:21,174 :: oauth2client.transport :: INFO :: Attempting refresh to obtain initial access_token 2019-02-08 16:25:21,183 :: oauth2client.client :: INFO :: Refreshing access_token Password:

it asks me to provide a Password, I' m not sure if it is a planet password, the planet KEY or the key provided when I run earthengine authenticate.
BUT the main issue is it doesn't allow me to write, or paste anything.
something similar happens to me when they ask me my mail and password.

any help?
thanks!

Error with Metadata Parser

Hi Samapriya,

I'll be embarrassed if this is another non-issue, but I've really exhausted my resources on this one...

First, it says a few places in the documentation that I can skip the metadata input for selupload if I am okay with not having it in GEE, so I tried but when I try to run the command:

ppipe selupload --source "Y:\duncansongp\Planet\fulldata" --dest "users/katehess1/planetforest" -u [email protected]

It asks for and takes my password, but then I get this error:

File "c:\users\katehess\appdata\local\continuum\miniconda3\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities

Could this be because I am not providing metadata? So then I tried using the metadata parser tool (command below), directing it to a folder that only contains XMLs (which were downloaded using porder), and got the error shown below.

ppipe metadata --asset PS4B --mf "Y:\duncansongp\Planet\xmls" --mfile "Y:\duncansongp\Planet\metadata\mdata.csv" --errorlog "Y:\duncansongp\Planet\metadata\errlog.csv"

File "c:\users\katehess\appdata\local\continuum\miniconda3\lib\csv.py", line 155, in writerow
return self.writer.writerow(self._dict_to_list(rowdict))
TypeError: a bytes-like object is required, not 'str'

I'm going to keep troubleshooting, but I wanted to reach out and see if you have any idea what could be the problem here. Really appreciate any help!

I've attached an XML that I tried to put through the metadata tool.

20180501_082515_0f34_3B_AnalyticMS_metadata.zip

Problem using version 0.38

Hello Samapriya, congratulations on your work!

I tried to install the last version using pip, everything works during installation, but when I try to run ppipe - h, I get the following error. I am using Windows 10, Anaconda3, Python 3.6:

File "C:\Anaconda3\envs\GIS\Scripts\ppipe-script.py", line 11, in
load_entry_point('ppipe==0.3.8', 'console_scripts', 'ppipe')()
File "C:\Anaconda3\envs\GIS\lib\site-packages\pkg_resources_init_.py", line 479, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "C:\Anaconda3\envs\GIS\lib\site-packages\pkg_resources_init_.py", line 2703, in load_entry_point
return ep.load()
File "C:\Anaconda3\envs\GIS\lib\site-packages\pkg_resources_init_.py", line 2321, in load
return self.resolve()
File "C:\Anaconda3\envs\GIS\lib\site-packages\pkg_resources_init_.py", line 2327, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "C:\Anaconda3\envs\GIS\lib\site-packages\ppipe\ppipe.py", line 7, in
from batch_copy import copy
ModuleNotFoundError: No module named 'batch_copy'

Error: Invalid value for "--geom": invalid GeoJSON

Hi,

I am trying to use the dasync command and keep getting the error: Invalid value for "--geom": invalid GeoJSON.

I cannot figure out what is going wrong- I even tried using geojsons that I have previously had success with using your porder CLI, but get the same error. I have attached the geojsons and this is the command I am running:
ppipe dasync --infile "calval.geojson" --item PSScene4Band --asset analytic --local "\fulldata" --start 2015-01-01 --end 2019-09-30 --cmin 0 --cmax .5

Planet.zip

Is there something wrong with the geojsons that I'm missing?
Thanks for your help!

confusing command line parameters

It is a bit confusing that sometimes you need to use --asst and sometimes --asset ; also --local is replaced with --pathway
Having the same names would be helpful (perhaps keeping old names working for compatibility)

Import Clipboard Error

Hi, I was wanted to use your scripts for getting the planet imagery I have up in to EE. I'm running OS X and ran through the set-up / install process. However when I run python ppipe.py I get the following error message:

Traceback (most recent call last):
  File "ppipe.py", line 13, in <module>
    import clipboard
ImportError: No module named clipboard

My apologies if this is a beginner question, but I can't seem to find documentation for clipboard, and I'm not quite sure what is causing this issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.