porder
Advanced tools
+47
-1
| Metadata-Version: 2.1 | ||
| Name: porder | ||
| Version: 0.8.0 | ||
| Version: 0.8.1 | ||
| Summary: Simple CLI for Planet Orders v2 | ||
@@ -315,2 +315,42 @@ Home-page: https://github.com/samapriya/porder | ||
| # Getting an idlist | ||
| Create an idlist for your geometry based on some basic filters,including geometry, start and end date and cloud cover. If no cloud cover is specified everything form 0 to 100% cloud cover is included. For now the tool can handle geojson,json and kml files. The output is a csv file with ids. The tool also allows you to make sure you get percentage overlap, when selecting image, for clip operations adjust it accordingly (usally --ovp 1 for orders not to fail during clip). The tool now also prints estimated area in Square kilometes for the download and estimated area if you clipped your area with the geometry you are searching (just estimates). | ||
| **I have changed the setup to now do the following two things** | ||
| * The number option is optional, so it can look for all images in the time range, but be careful if the area is too large, _use at own risk_. A better option is to supply the number. | ||
| * It is possible to often forget about the different asset types, so you can now not pass an item and the script will return every possible type of asset for each item type depending on the bundle. | ||
|  | ||
| A simple setup would be | ||
|  | ||
| To run an experiment to add additional filter, you can now pass an additional string or range filter or both flag for string and range filters, a setup would be. The additional filters are optional | ||
| <b> | ||
| ``` | ||
| porder idlist --input "Path to geojson file" --start "YYYY-MM-DD" --end "YYYY-MM-DD" --item "PSScene4Band" --asset "analytic" --outfile "Path to idlist.csv" --filters range:clear_percent:55:100 --number 20 | ||
| porder idlist --input "Path to geojson file" --start "YYYY-MM-DD" --end "YYYY-MM-DD" --item "PSScene4Band" --asset "analytic" --outfile "Path to idlist.csv" --filters string:satellite_id:"1003,1006,1012,1020,1038" --number 20 | ||
| porder idlist --input "Path to geojson file" --start "YYYY-MM-DD" --end "YYYY-MM-DD" --item "PSScene4Band" --asset "analytic" --outfile "Path to idlist.csv" --filters string:satellite_id:"1003,1006,1012,1020,1038" range:clear_percent:55:100 --number 20 | ||
| ``` | ||
| </b> | ||
| The search tool now allows the user to pass Hours , Minutes and seconds and utilizes the local timezone on the users computer to search. This including the format HH:MM:SS seperated from yyyy-mm-dd by T. An example would be the following, while noting that passing time is purely optional and you can still search by simply passing YYYY-MM-DD. | ||
| ``` | ||
| porder idlist --input "Path to geojson file" --start "yyyy-mm-ddTHH:MM:SS" --end "yyyy-mm-ddTHH:MM:SS" --item "PSScene4Band" --asset "analytic" --outfile "Path to idlist.csv" --filters range:clear_percent:55:100 --number 20 | ||
| porder idlist --input "Path to geojson file" --start "2021-01-01T14:12:10" --end "2021-03-01T16:20:20" --item "PSScene4Band" --asset "analytic" --outfile "Path to idlist.csv" --number 20 | ||
| ``` | ||
| The idlist tool can now use a multipolygon and iteratively look for scenes. | ||
| ### difflist | ||
@@ -541,2 +581,8 @@ It is possible you already downloaded some images or metadata files, and your you want a difference idlist to create orders for only assets and item types you do not have. It takes in your local folder path, type image or metadata and some basic filters,including geometry, start and end date and cloud cover. If no cloud cover is specified everything form 0 to 100% cloud cover is included. For now the tool can handle geojson,json and kml files. The output is a csv file with ids. | ||
| ### v0.8.1 | ||
| - Search function can now parse date and time. Enhancement from [Issue 47](https://github.com/tyson-swetnam/porder/issues/47) | ||
| - Updated readme site to include search examples | ||
| - Stability test across python3.7 to 3.9 and for all os types | ||
| - pipwin checks cache every one month | ||
| ### v0.8.0 | ||
@@ -543,0 +589,0 @@ - Added gee-integration example |
| Metadata-Version: 2.1 | ||
| Name: porder | ||
| Version: 0.8.0 | ||
| Version: 0.8.1 | ||
| Summary: Simple CLI for Planet Orders v2 | ||
@@ -315,2 +315,42 @@ Home-page: https://github.com/samapriya/porder | ||
| # Getting an idlist | ||
| Create an idlist for your geometry based on some basic filters,including geometry, start and end date and cloud cover. If no cloud cover is specified everything form 0 to 100% cloud cover is included. For now the tool can handle geojson,json and kml files. The output is a csv file with ids. The tool also allows you to make sure you get percentage overlap, when selecting image, for clip operations adjust it accordingly (usally --ovp 1 for orders not to fail during clip). The tool now also prints estimated area in Square kilometes for the download and estimated area if you clipped your area with the geometry you are searching (just estimates). | ||
| **I have changed the setup to now do the following two things** | ||
| * The number option is optional, so it can look for all images in the time range, but be careful if the area is too large, _use at own risk_. A better option is to supply the number. | ||
| * It is possible to often forget about the different asset types, so you can now not pass an item and the script will return every possible type of asset for each item type depending on the bundle. | ||
|  | ||
| A simple setup would be | ||
|  | ||
| To run an experiment to add additional filter, you can now pass an additional string or range filter or both flag for string and range filters, a setup would be. The additional filters are optional | ||
| <b> | ||
| ``` | ||
| porder idlist --input "Path to geojson file" --start "YYYY-MM-DD" --end "YYYY-MM-DD" --item "PSScene4Band" --asset "analytic" --outfile "Path to idlist.csv" --filters range:clear_percent:55:100 --number 20 | ||
| porder idlist --input "Path to geojson file" --start "YYYY-MM-DD" --end "YYYY-MM-DD" --item "PSScene4Band" --asset "analytic" --outfile "Path to idlist.csv" --filters string:satellite_id:"1003,1006,1012,1020,1038" --number 20 | ||
| porder idlist --input "Path to geojson file" --start "YYYY-MM-DD" --end "YYYY-MM-DD" --item "PSScene4Band" --asset "analytic" --outfile "Path to idlist.csv" --filters string:satellite_id:"1003,1006,1012,1020,1038" range:clear_percent:55:100 --number 20 | ||
| ``` | ||
| </b> | ||
| The search tool now allows the user to pass Hours , Minutes and seconds and utilizes the local timezone on the users computer to search. This including the format HH:MM:SS seperated from yyyy-mm-dd by T. An example would be the following, while noting that passing time is purely optional and you can still search by simply passing YYYY-MM-DD. | ||
| ``` | ||
| porder idlist --input "Path to geojson file" --start "yyyy-mm-ddTHH:MM:SS" --end "yyyy-mm-ddTHH:MM:SS" --item "PSScene4Band" --asset "analytic" --outfile "Path to idlist.csv" --filters range:clear_percent:55:100 --number 20 | ||
| porder idlist --input "Path to geojson file" --start "2021-01-01T14:12:10" --end "2021-03-01T16:20:20" --item "PSScene4Band" --asset "analytic" --outfile "Path to idlist.csv" --number 20 | ||
| ``` | ||
| The idlist tool can now use a multipolygon and iteratively look for scenes. | ||
| ### difflist | ||
@@ -541,2 +581,8 @@ It is possible you already downloaded some images or metadata files, and your you want a difference idlist to create orders for only assets and item types you do not have. It takes in your local folder path, type image or metadata and some basic filters,including geometry, start and end date and cloud cover. If no cloud cover is specified everything form 0 to 100% cloud cover is included. For now the tool can handle geojson,json and kml files. The output is a csv file with ids. | ||
| ### v0.8.1 | ||
| - Search function can now parse date and time. Enhancement from [Issue 47](https://github.com/tyson-swetnam/porder/issues/47) | ||
| - Updated readme site to include search examples | ||
| - Stability test across python3.7 to 3.9 and for all os types | ||
| - pipwin checks cache every one month | ||
| ### v0.8.0 | ||
@@ -543,0 +589,0 @@ - Added gee-integration example |
@@ -5,2 +5,2 @@ # -*- coding: utf-8 -*- | ||
| __email__ = "samapriya.roy@gmail.com" | ||
| __version__ = "0.8.0" | ||
| __version__ = "0.8.1" |
+30
-5
@@ -5,3 +5,3 @@ from __future__ import print_function | ||
| Copyright 2019 Samapriya Roy | ||
| Copyright 2021 Samapriya Roy | ||
@@ -37,2 +37,6 @@ Licensed under the Apache License, Version 2.0 (the "License"); | ||
| from shapely.ops import transform | ||
| from datetime import datetime | ||
| from datetime import timezone | ||
| from time import mktime | ||
| from planet.api.utils import strp_lenient | ||
@@ -53,2 +57,20 @@ try: | ||
| # Get time right | ||
| def time2epoch(st): | ||
| str_time = datetime.strptime(st.isoformat(), "%Y-%m-%dT%H:%M:%S") | ||
| str_tuple = str_time.timetuple() | ||
| epoch_time = mktime(str_tuple) | ||
| return epoch_time | ||
| def time2utc(st): | ||
| st_time = strp_lenient(st) | ||
| if st_time is not None: | ||
| dt_ts = datetime.fromtimestamp(time2epoch(st_time), tz=timezone.utc) | ||
| return dt_ts.isoformat().replace("+00:00", "Z") | ||
| else: | ||
| sys.exit("Could not parse time {}: check and retry".format(st)) | ||
| # get coordinates list depth | ||
@@ -154,9 +176,12 @@ def list_depth(dic, level=1): | ||
| try: | ||
| start = value | ||
| start = time2utc(value) | ||
| st = filters.date_range("acquired", gte=start) | ||
| except Excpetion as e: | ||
| except Exception as e: | ||
| sys.exit(e) | ||
| if key == "end" and value is not None: | ||
| end = value | ||
| ed = filters.date_range("acquired", lte=end) | ||
| try: | ||
| end = time2utc(value) | ||
| ed = filters.date_range("acquired", lte=end) | ||
| except Exception as e: | ||
| sys.exit(e) | ||
| if key == "asset" and value is not None: | ||
@@ -163,0 +188,0 @@ try: |
+5
-5
@@ -65,3 +65,3 @@ from __future__ import print_function | ||
| file_mod_time = os.stat(fullpath).st_mtime | ||
| if int((time.time() - file_mod_time) / 60) > 20160: | ||
| if int((time.time() - file_mod_time) / 60) > 43200: | ||
| print("Refreshing your pipwin cache") | ||
@@ -579,6 +579,6 @@ subprocess.call("pipwin refresh", shell=True) | ||
| required_named.add_argument( | ||
| "--start", help="Start date in format YYYY-MM-DD", required=True | ||
| "--start", help="Start Date &/or Time yyyy-mm-ddTHH:MM:SS", required=True | ||
| ) | ||
| required_named.add_argument( | ||
| "--end", help="End date in format YYYY-MM-DD", required=True | ||
| "--end", help="End Date &/or Time yyyy-mm-ddTHH:MM:SS", required=True | ||
| ) | ||
@@ -643,4 +643,4 @@ required_named.add_argument( | ||
| ) | ||
| required_named.add_argument("--start", help="Start Date YYYY-MM-DD", required=True) | ||
| required_named.add_argument("--end", help="End Date YYYY-MM-DD", required=True) | ||
| required_named.add_argument("--start", help="Start date in format YYYY-MM-DD", required=True) | ||
| required_named.add_argument("--end", help="End date in format YYYY-MM-DD", required=True) | ||
| required_named.add_argument( | ||
@@ -647,0 +647,0 @@ "--outfile", help="Full path to CSV file with difference ID list", required=True |
+46
-0
@@ -307,2 +307,42 @@ # porder: Simple CLI for Planet ordersV2 API [](https://twitter.com/intent/tweet?text=Use%20porder%20CLI%20with%20@planetlabs%20new%20ordersv2%20API&url=https://github.com/tyson-swetnam/porder) | ||
| # Getting an idlist | ||
| Create an idlist for your geometry based on some basic filters,including geometry, start and end date and cloud cover. If no cloud cover is specified everything form 0 to 100% cloud cover is included. For now the tool can handle geojson,json and kml files. The output is a csv file with ids. The tool also allows you to make sure you get percentage overlap, when selecting image, for clip operations adjust it accordingly (usally --ovp 1 for orders not to fail during clip). The tool now also prints estimated area in Square kilometes for the download and estimated area if you clipped your area with the geometry you are searching (just estimates). | ||
| **I have changed the setup to now do the following two things** | ||
| * The number option is optional, so it can look for all images in the time range, but be careful if the area is too large, _use at own risk_. A better option is to supply the number. | ||
| * It is possible to often forget about the different asset types, so you can now not pass an item and the script will return every possible type of asset for each item type depending on the bundle. | ||
|  | ||
| A simple setup would be | ||
|  | ||
| To run an experiment to add additional filter, you can now pass an additional string or range filter or both flag for string and range filters, a setup would be. The additional filters are optional | ||
| <b> | ||
| ``` | ||
| porder idlist --input "Path to geojson file" --start "YYYY-MM-DD" --end "YYYY-MM-DD" --item "PSScene4Band" --asset "analytic" --outfile "Path to idlist.csv" --filters range:clear_percent:55:100 --number 20 | ||
| porder idlist --input "Path to geojson file" --start "YYYY-MM-DD" --end "YYYY-MM-DD" --item "PSScene4Band" --asset "analytic" --outfile "Path to idlist.csv" --filters string:satellite_id:"1003,1006,1012,1020,1038" --number 20 | ||
| porder idlist --input "Path to geojson file" --start "YYYY-MM-DD" --end "YYYY-MM-DD" --item "PSScene4Band" --asset "analytic" --outfile "Path to idlist.csv" --filters string:satellite_id:"1003,1006,1012,1020,1038" range:clear_percent:55:100 --number 20 | ||
| ``` | ||
| </b> | ||
| The search tool now allows the user to pass Hours , Minutes and seconds and utilizes the local timezone on the users computer to search. This including the format HH:MM:SS seperated from yyyy-mm-dd by T. An example would be the following, while noting that passing time is purely optional and you can still search by simply passing YYYY-MM-DD. | ||
| ``` | ||
| porder idlist --input "Path to geojson file" --start "yyyy-mm-ddTHH:MM:SS" --end "yyyy-mm-ddTHH:MM:SS" --item "PSScene4Band" --asset "analytic" --outfile "Path to idlist.csv" --filters range:clear_percent:55:100 --number 20 | ||
| porder idlist --input "Path to geojson file" --start "2021-01-01T14:12:10" --end "2021-03-01T16:20:20" --item "PSScene4Band" --asset "analytic" --outfile "Path to idlist.csv" --number 20 | ||
| ``` | ||
| The idlist tool can now use a multipolygon and iteratively look for scenes. | ||
| ### difflist | ||
@@ -533,2 +573,8 @@ It is possible you already downloaded some images or metadata files, and your you want a difference idlist to create orders for only assets and item types you do not have. It takes in your local folder path, type image or metadata and some basic filters,including geometry, start and end date and cloud cover. If no cloud cover is specified everything form 0 to 100% cloud cover is included. For now the tool can handle geojson,json and kml files. The output is a csv file with ids. | ||
| ### v0.8.1 | ||
| - Search function can now parse date and time. Enhancement from [Issue 47](https://github.com/tyson-swetnam/porder/issues/47) | ||
| - Updated readme site to include search examples | ||
| - Stability test across python3.7 to 3.9 and for all os types | ||
| - pipwin checks cache every one month | ||
| ### v0.8.0 | ||
@@ -535,0 +581,0 @@ - Added gee-integration example |
+1
-1
@@ -23,3 +23,3 @@ import sys | ||
| name='porder', | ||
| version='0.8.0', | ||
| version='0.8.1', | ||
| packages=['porder'], | ||
@@ -26,0 +26,0 @@ url='https://github.com/samapriya/porder', |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
298468
4.16%3961
0.51%