Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Expansion to planetary bodies? #27

Closed
michaelaye opened this issue Feb 9, 2017 · 15 comments
Closed

Expansion to planetary bodies? #27

michaelaye opened this issue Feb 9, 2017 · 15 comments

Comments

@michaelaye
Copy link

How hard would it be to expand this to other planets, most urgently Mars?
I'm a Mars surface scientist and any way to have easy Mars surface displays inside Jupyter would be awesome.
Is there a list of things that are required somewhere? Like basemaps in that format stored here, etc...

@Carreau
Copy link
Member

Carreau commented Feb 9, 2017 via email

@ian-r-rose
Copy link
Member

It should be possible, but not without a bit of work. You would need to load in a (raster) Mars tileset instead of the current Earth political tileset (something like what Google has done here. This would provide the underlying map layer. I am not sure where such a tileset might be found.

GeoJSON itself is a vector format, so whatever data you would be plotting on top of the map tileset would have to be convertable to that (I think that GDAL can do it for a number of formats, for instance).

@michaelaye
Copy link
Author

@Carreau yeah, not much of a surface at Jupiter. ;)

I know where to get tilesets, they are being produced for the public by the USGS, so that's not a problem. And if there's format problems, I have colleagues there that can help out. Where can I find the Earth tileset reading/storing mechanism? I tried to browse the code to find it but can't see anything relevant?

@ian-r-rose
Copy link
Member

The relevant link is in component/index.js. I was able to get a Mars tileset (mola-color) loading in the plugin by swapping it out for a link found here. It looked like it had some alignment issues, but was a promising start. I can push a branch tomorrow as a demonstration.

@jasongrout
Copy link
Member

I think this is really cool that someone is exploring doing Mars surface analysis in Jupyter using the leaflet plugin. I'd love to see an example notebook at some point using this.

@ian-r-rose
Copy link
Member

Here is a branch that swaps out the OpenStreetMap political tileset with a Martian one. The server that provides the tileset appears to be set up through openplanetary/whereonmars.
Their wiki suggests (at least to me) that the tilesets are open, but it might be worth checking in on how they would best want to use their compute resources. Of course, you could also set up your own tile server :)

@blink1073
Copy link
Member

Awesome sauce.

@michaelaye
Copy link
Author

i am an admin member of OpenPlanetary, will discuss it with the guys. ;) Thanks a lot!

@michaelaye
Copy link
Author

michaelaye commented Feb 10, 2017

For some reason, the display is only working in half of the box?
screenshot 2017-02-10 12 55 48

EDIT: Using Safari 10.0.3 on OSX 10.11.6, Python 3.5 via conda, matplotlib 2.0

@michaelaye
Copy link
Author

Question: Which protocols are supported via this Leaflet? Only tiled WMS? Or also traditional WMS? (I'm a WMS noob so excuse my ignorance ;) )

@gnestor
Copy link
Contributor

gnestor commented Feb 10, 2017

FYI, I'm working on an update to the GeoJSON display class (which is moving to ipython BTW) that will accept additional Leaflet-specific arguments, e.g.:

from IPython.display import GeoJSON

GeoJSON(data={
    "type": "Feature",
    "geometry": {
        "type": "Point",
        "coordinates": [-81.327, 296.038]
    },
    "properties": {
        "name": "Inca City"
    }
}, 
url_template="http://s3-eu-west-1.amazonaws.com/whereonmars.cartodb.net/{basemap_id}/{z}/{x}/{y}.png", 
layer_options={
    "basemap_id": "celestia_mars-shaded-16k_global",
    "attribution" : "Celestia/praesepe",
    "minZoom" : 0,
    "maxZoom" : 18,
})

@michaelaye
Copy link
Author

oh, that's nice, then I can store a catalog of urls, and mix and match things! ;)

@gnestor
Copy link
Contributor

gnestor commented Feb 10, 2017

Ya, the Leaflet's URL template should not be hard-coded because there are obviously so many different sources of tilesets.

@gnestor
Copy link
Contributor

gnestor commented Feb 22, 2017

This is implemented with #30! It depends on jupyterlab@0.17.0 (or master).

image

@gnestor gnestor mentioned this issue Feb 22, 2017
@gnestor
Copy link
Contributor

gnestor commented Mar 1, 2017

Closed by #30. Give it a try!!

@gnestor gnestor closed this as completed Mar 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants