Coder Social home page Coder Social logo

planetr's People

Contributors

bevingtona avatar elistockwell avatar micheletobias avatar tnelsen 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  avatar

Watchers

 avatar  avatar  avatar  avatar

planetr's Issues

add additional image filters

It would be nice to be able to use the R package to filter images for additional things like ground control, quality, etc.

Error in API request

planetR/R/planet_search.R

Lines 93 to 117 in a135a79

# filter by ground control
gc_filter <- list(
type= jsonlite::unbox("NotFilter"),
config = list(
field_name= jsonlite::unbox("ground_control"),
type= jsonlite::unbox("StringInFilter"),
config = list(jsonlite::unbox(tolower(!ground_control)))
)
)
# filter by quality
quality_filter <- list(
type = jsonlite::unbox("NotFilter"),
config = list(
field_name= jsonlite::unbox("quality_category"),
type= jsonlite::unbox("StringInFilter"),
config = list(jsonlite::unbox(quality))
)
)
# combine filters
filter_configs <- list(
type= jsonlite::unbox("AndFilter"),
config = list(date_range_filter, cloud_cover_filter, gc_filter, quality_filter, geometry_filter) #, coverage_filter
)

I noticed that the API request for ground control and quality category in the planet_search function is wrongly written. With the "NotFilter", I suspect we are requesting for the opposite category, leading to significantly fewer and low-quality results. I suggest the following changes.

# filter by ground control, quality
  gq_filter <- list(
    type= jsonlite::unbox("AndFilter"),
    config = list(
      list(
        field_name= jsonlite::unbox("ground_control"),
        type= jsonlite::unbox("StringInFilter"),
        config = list(jsonlite::unbox(tolower(ground_control)))
      ),
      list(
        field_name= jsonlite::unbox("quality_category"),
        type= jsonlite::unbox("StringInFilter"),
        config = list(jsonlite::unbox(quality))
      ))
  )
  
  # combine filters
  filter_configs <- list(
    type= jsonlite::unbox("AndFilter"),
    config = list(date_range_filter, cloud_cover_filter, gq_filter, geometry_filter) #, coverage_filter
  )

Limit the download images to the latest image

Dear contributor,
I have finally set the API key and now it is working perfectly. #12

Congrants and thanks to develop this package.

I kidly ask you if it is possible to add an additional argument to planet_order that request to download only the latest available image for those parameters.

Best regards

Implementing Planet's Orders API

First of all, thanks for making this package! There is very little support outside of Python for the Planet API, and I'm relatively new to APIs in general so having your code to look at was a real help. I believe right now you are exclusively using Planet's Data API? I'm not sure if you've looked at or worked with the Orders API, but it has some useful aspects like the built in clipping tool that clips images before download to save data (it seems like your download_withClip function clips them after but correct me if I'm wrong), and the orders themselves show up on the Planet account similar to orders placed using the Planet Explorer (they can be downloaded again using the order_id). I've written a function that uses your planet_search function to get item_ids and then places an order with those ids and clips them to the AOI. Let me know if this is something you would find useful and I can submit it with a pull request.

date filter

Hi very cool product! just wanted help on how to specify list of exact dates as filter instead of the date range? (for example I have listed 15 dates where low tide conditions are expected). Many thanks!

subscript out of bounds

Dear creator,
I am trying to download the images of the "PSScene4Band" by using the tool that you have developed but i am receving the following error output

Error in permissions[, 1] : subscript out of bounds

I have setted correctly the api key because I had previously successfully downloaded the images.

I will report here all the information in order to reproduce the error

class      : Extent 
xmin       : 13.38829 
xmax       : 13.39752 
ymin       : 43.60996 
ymax       : 43.61316 

date_start<-2022-05-10
date_end<-2022-05-18

most_recent=2
cloud_lim = 0.2
item_name= PSScene4Band
product = analytic_sr

could you please help me to understand and fix the issue.

Thanks as always.

implement clip to AOI

Planet API has the ability to clip to AOI (or not). It would be great to implement this option.

item_types changed in Planet API

Just learned that the item types have changed so that all the Planet Scope data has the item type "PSScene" including the new 8-band data. Items types of "PSScene4Band" (for example) are being depreciated.

Error in permissions[, 1] : subscript out of bounds

Dear creator,
The script below was working a week ago but now the console give me the follow output

1] "Search from yday and year ranges"
[1] "You have DOWNLOAD permissions for these images."
[1] "Found 0 suitable PSScene ortho_analytic_8b_sr images that you have permission to download."
[1] "Between yday: 15 to 11"
[1] "You DO NOT have DOWNLOAD permissions for these images. You have  permission"
[1] "Item ID You DO NOT have DOWNLOAD permissions for these images. You have  permission / Item Type PSScene doesn't exist"
[1] "Save the Order ID: "
[1] "You can restart the download with `planet_order_download(order_id, order_name)`"
Error in while (get_content$state != "success") { : 
  argument is of length zero

Perhaps it is related to #15

The following is the parameter that i have use to download the satellite images

bbox

class      : Extent 
xmin       : 13.38879 
xmax       : 13.39702 
ymin       : 43.61046 
ymax       : 43.61266 

start_date

2022-01-15

end_date

2023-01-11

the api call

planet_order(api_key = api_key,
                 bbox = bbox,
                 date_end = date_end,
                 date_start = date_start,
                 cloud_lim = cloud_lim,
                 item_name = "PSScene",
                 product_bundle = "analytic_8b_sr_udm2",
                 asset = "ortho_analytic_8b_sr",
                 order_name = exportfolder)

Orders API v2 does not work for orders > 100 images...?

My Planet subscription does not allow me to make large orders using the Orders API...? Is there a limit?

Large requests (>100 images) work fine using the original API (v1) but the Orders API function does not work with orders > 100.

This is the error message:
No access to assets: PSScene4Band/20200424_185242_1105/[analytic_sr]
Unable to accept order

hexagon logo

Hello,

I made a hexagon logo and was wondering if you are interested in using this design. I can modify it if you like.

If you do like it, please credit me as Zane Dax @StarTrek_Lt

planetr
.

Result of planet_search a vector not a table, replace nrow with length and [i,] with [i]

In the example in the readme, the output of the planet_search() function is named response. The example assumes that response has rows, when I am getting a vector as the output.

for(i in 1:nrow(response)) {
  planet_activate(i, item_name = item_name)
  print(paste("Activating", i, "of", nrow(response)))}

# PLANET_DOWNLOAD: Batch Download 

for(i in 1:nrow(response)) {
  planet_download(i)
  print(paste("Downloading", i, "of", nrow(response)))}

The example should be changed to the following:

for(i in 1:length(response)) {
  planet_activate(i, item_name = item_name)
  print(paste("Activating", i, "of", length(response)))}

# PLANET_DOWNLOAD: Batch Download 

for(i in 1:length(response)) {
  planet_download(i)
  print(paste("Downloading", i, "of", length(response)))}

In addition, within the functions planet_activate() and planet_download(), the index of response should be changed from 2-dimensional to 1-dimensional:

response[i]

planet_search() error

I'm trying to search for images within my bounding box and even after trying several combinations of dates I receive the same error after running response <- planet_search(bbox, date_end, date_start, cloud_lim, item_name) Error in permissions[, 1] : subscript out of bounds
Above my item_name = "PSScene" after the recent changes in Planet's item assets and merging of the SuperDove datasets.
Not sure what the error is referring to within the planet_search() variables. Upon trying the example in the README i still receive the same error.

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.