Skip to content

How to retain features outside of bbox after a projection? #672

Description

@DigitalNaut

Hey mbloch,

I'm working on an interactive learning app and I've encountered a tricky use case.

My app uses SVGs projected on a Leaflet map for various reasons.

I'm trying to reconcile features of my map data, namely Russia and Oceania, that have features spanning both sides of the image so I can have all the features visible in one area for the user. This forces me to transpose these features to the other side of the map, but they're left hanging off the standard frame. Unfortunately, when I project the map these features outside the limit are clipped entirely off the data.

I've tried rearranging my commands around this constraint, but Leaflet requires me to use pre-projected data that I can't generate after I've projected and transposed. This also leads me to a lot of big code duplication.

So I guess my question is two-fold:

  • Is there a way to preserve features outside the limits after a projection?
  • If that's not the case, is there a way to reproject the coordinates back to the original format?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions