ziotom78 / Healpix.jl

Healpix library written in Julia
GNU General Public License v2.0
51 stars 18 forks source link

getting back coordinates(vertices) from equirectangular projection #77

Closed lazarusA closed 2 years ago

lazarusA commented 2 years ago

Say I do

nside = 8
m = HealpixMap{Float64,RingOrder}(nside)
m.pixels[:] = 1:length(m.pixels)

and then using Plots I can see a nice picture

plot(m, equirectangular)

I would rather like to have a set of points (lon, lat,) for each element pix, the vertices for each new pix tessellation. Let's say that instead of doing a heatmap I would like to do a wireframe with these points. Is there an in-built function for this? or a combination of the ones already available that might help. I went trough the docs without so much luck.

ziotom78 commented 2 years ago

Unfortunately not, but I am porting a set of functions from Healpix (mainly to fix #27), and I can include boundaries as well: I believe this is exactly what you are looking for.

Of course, you would have to apply a projection to each of those points, but unfortunately the code that creates the map is a pixel-based code: it does not work on polygons but on single pixels.

lazarusA commented 2 years ago

Yes, that's exactly what I'm looking for. And yes sure... I just need a way to get the data out, the rest I can take care.

ziotom78 commented 2 years ago

Hi @lazarusA , commit #81 implements the boundariesRing function, which should be close to what you were looking for. See the example in the documentation for a nice 3D plot of a tessellated sphere.

lazarusA commented 2 years ago

thanks.

lazarusA commented 1 year ago

I forgot to mention, that is currently being use here: https://lazarusa.github.io/ClimateVisualisations/appt2m_healpix.html Thanks again.

ziotom78 commented 1 year ago

@lazarusA very nice, thank you for the link!