Open koldunovn opened 5 years ago
Suspect something goes wrong at the boundaries when projecting the TriMesh. Will have to have a more detailed look later.
Thanks a lot for looking at this!
In order to avoid problems at the boundaries we usually just remove elements that cross +-180, with something like this:
d=xnodes[elem].max(axis=1) - xnodes[elem].min(axis=1)
no_cyclic_elem = [i for (i, val) in enumerate(d) if val < 100]
But when I use:
trimesh = gv.TriMesh((elem[no_cyclic_elem], (xnodes, ynodes)), crs=ccrs.PlateCarree())
trimesh
the error is the same, while in Basemap and cartopy it usually solves the problem of horizontal stripes that go across the globe.
One more thing that might help is that I have discovered the code below works (and OMG it's fast!):
from holoviews.operation.datashader import datashade
trimesh = gv.TriMesh((elem[no_cyclic_elem], (xnodes, ynodes)), crs=ccrs.PlateCarree())
datashade(trimesh )
Hi koldunovn any solution you got for this ?
@sameerCoder No, no progress on this.
Hi Koldunovn can you help me in solving getting colorbar and colormap in my trimesh plot . plz see the this question of stackoverflow and let me know how to solve this issue . thank you.
I am trying to follow this example http://geo.holoviews.org/gallery/bokeh/trimesh_uk.html#bokeh-gallery-trimesh-uk
but plot triangular mesh that covers the whole globe. Below are the code and the error message (I run the code in classical Jupyter notebook):
If I use a small subset of elements, for example:
The plot is shown covered by points at nodes locations that are connected in some places (as they should be).
I would appreciate any help.
BTW the mesh should look something like this