Closed brmather closed 1 year ago
Are there cases where a pygplates 3D geometry is converted to a Shapely 2D geometry (using one central meridian, maybe just zero) and then later sometime those Shapely geometries are plotted using a different central meridian?
Just wondering because, for polygons, that could result in vertical lines inside the plot (instead of just at the map's side boundaries).
However in plot.py
it looks like shapelify_features
is delayed until plotting (ie, when you know the plot's central meridian). So I guess it's not an issue provided the plot's central meridian is passed through to it.
However in
plot.py
it looks likeshapelify_features
is delayed until plotting (ie, when you know the plot's central meridian). So I guess it's not an issue provided the plot's central meridian is passed through to it.
I guess the problem is the central meridian was not passed through.
And looks like some work is being done to address that on the plot-kw
branch (see f39008b).
I see that @cpalfonso made that commit. Is there any update on this?
anyone knows what's the status of the plot-kw branch? Is it ready to be merged or still under development?
@cpalfonso - is #104 safe to merge?
Sorry everyone, I've only recently got around to tidying this work up into a couple of commits (#105). As far as I can tell, the changes seem to work well for different central longitudes:
I can't spot any issues with orthographic projections, either:
Thanks @cpalfonso! I'll mark this as complete.
Currently
gplately
wraps all geometries to the dateline, which divides topologies that cross the dateline into smaller topologies that butt up against the -180/180 degree dateline.https://github.com/GPlates/gplately/blob/9b832088a86d36b8154172d95f037bcf237f1331/gplately/geometry.py#L168-L308
However, this does not (currently) work for geometries which use the 0/360 degree longitude convention. We need to create an additional wrapping for
central_meridian=180
, which is implemented in this function:https://github.com/GPlates/gplately/blob/9b832088a86d36b8154172d95f037bcf237f1331/gplately/geometry.py#L398-L469
I suppose two wrappings (-180/180 and 0/360) should be done by default. I don't think this would add too much additional overhead.