PythonFromSpace
PythonFromSpace copied to clipboard
Make a slippy map to get GeoJSON -- Does not display the map
I have created an account on planet.com. Copied the api key from https://www.planet.com/account/#/ into a file called apikeys.json inside the root of this project.
{"PLANET_API_KEY":"<api key>"}
But when I execute the second code snippet the notebook failed to get the tiles. In the google chrome dev tools I can see the requests being made to :
- https://tiles0.planet.com/experimental/mosaics/planet-tiles/global_quarterly_2017q1_mosaic/gmap/11/325/732.png?api_key=<api_key>
But this URLs return Unauthorized
.
Try opening that url, a developer login should appear, it should be the credentials associated with your key.
@yml The Planet base tiles weren't rendering for me either. You'll see a line like default_tiles = planetMapTiles # Uncomment to use Planet.com basemap
, and if you uncomment it, it will render a map with the default Leaflet base tiles instead.
TLDR just make your code look like this:
# Create the map
m = Map(
center=center,
zoom=zoom,
# default_tiles = planetMapTiles # Uncomment to use Planet.com basemap
)
@LukeSwart thank you. I did this but I think that this issue in #1 is related. it is unfortunate that this demo use either unreliable api or not fee one.
I probably got too excited about the presentation and what I could build with this :-( @kscottz thank you for putting this presentation / notebook together. I tried to open in in a browser tab or with curl but it only return a 401.
HTTP/1.1 401 Unauthorized
Content-Length: 13
Content-Type: text/plain; charset=utf-8
Date: Thu, 25 May 2017 11:28:28 GMT
Server: nginx/1.10.1
X-Content-Type-Options: nosniff
Connection: keep-alive
@yml The free account (and API key) you signed up for at https://www.planet.com/explorer/ gives you access to a lot of data! Through our Open California program, you can pull several years' worth of imagery for the entire state of CA under a CC BY-SA 4.0 license.
Kat used imagery for Portland in her talk and demo at Pycon because the conference was in Portland. We're in the process of developing a series of notebooks using Open California data that you'll be able to use just by plugging in the API key you get with your free account.
We have a couple other programs that could give access to data in other geographic areas, if you're interested:
- Ambassador's Program: https://www.planet.com/pulse/planet-offers-broader-data-access-to-the-academic-community/
- Application Developer Program: https://www.planet.com/products/developer-program/
- Natural Disaster Response Program: https://www.planet.com/disasterdata/