Skip to main content

Hello, I would like to download the quarterly SR base maps, ideally the normalized images with NIR. I am using the mosaics API to search for available imagery with:

basemap_url = (
"https://api.planet.com/basemaps/v1/mosaics/?_page_size=2000&name__contains=SR"
)
basemapServiceResponse = requests.get(url=basemap_url, auth=auth)

basemaps = basemapServiceResponse.raise_for_status()
if basemapServiceResponse.status_code != 204:
basemaps = json.loads(basemapServiceResponse.text)
basemaps.get("mosaics")

In the results I only see monthly products with names matching the pattern:

ps_monthly_analytic_sr_subscription_2016_09_mosaic

Even then, I am unable to download those images. I have had success with downloading files matching this pattern:

global_quarterly_2016q1_mosaic

But these do not include NIR. 

The code I am using to place my order is:

def place_order(request, auth):
response = requests.post(
order_url,
data=json.dumps(request),
auth=auth,
headers={"content-type": "application/json"},
)
print(response.json())
order_id = response.json()n"id"]
print(order_id)
order_url_id = order_url + "/" + order_id
return order_url_id

order_params = {
"name": "Basemap order with geometry",
"source_type": "basemaps",
"order_type": "partial",
"products": "
{
"mosaic_name": "ps_quarterly_sen2_normalized_analytic_subscription_2023-01-01_2023-04-01_mosaic",
"geometry": geometry,
}
],
"tools": "{"merge": {}}, {"clip": {}}],
}

place_order(order_params, auth)

And I am receiving this message:

{'field': None, 'general': '{'message': 'Unable to accept order: no basemap quads were found that match order parameters'}]}
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
Cell In 21], line 1
----> 1 basemap_url = place_order(order_params, auth)
2 basemap_url

Cell In 8], line 9, in place_order(request, auth)
2 response = requests.post(
3 order_url,
4 data=json.dumps(request),
5 auth=auth,
6 headers={"content-type": "application/json"},
7 )
8 print(response.json())
----> 9 order_id = response.json()n"id"]
10 print(order_id)
11 order_url_id = order_url + "/" + order_id

KeyError: 'id'

I am new to Planet imagery and the APIs so I am wondering if I am doing something wrong or if I simply do not have access to these products. I am at a university with a E&R (Departmental or Campus Package) license. Any information would be appreciated!

Hi @cmolitor

Based on our investigation, the problem might be with your permission. Therefore, we have raised a support ticket on your behalf and copied the email you use to sign in to the community.

 

Please let us know if we can help you with anything else!


The short answer here is that the Planet Basemaps with NIR are not offered with the university license I am using. Here is the reply I received:

Unfortunately the customized surface reflectance basemap option is not part of the Education & research license. It would have to be included separately at a cost.

Hope this helps other people in my situation. The best alternative is to use the NICFI data


Thank you @cmolitor for helping the community out by providing the reply you got! 


Reply