Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add optional override "degrees" projection instead of hardwired to EPSG:4326 #358

Open
thareUSGS opened this issue Sep 16, 2022 · 3 comments

Comments

@thareUSGS
Copy link

Instead of hard-wiring EPSG:4326, perhaps it can still be the default, but allow for other off-Earth bodies (e.g. "IAU" codes).

Recommendations:


  1. to
def densify_reproject_simplify(
    polygon: Polygon,
    crs: CRS,
    crs_deg: str = "EPSG:4326",
    densification_factor: Optional[int] = None,
    precision: int = DEFAULT_PRECISION,
    simplify_tolerance: Optional[float] = None,
) -> Polygon:
  1. polygon = shape(transform_geom(crs, "EPSG:4326", polygon, precision=precision))

    to
    polygon = shape(transform_geom(crs, crs_deg, polygon, precision=precision))
@gadomski
Copy link
Member

No objections here, pull request welcome! Let me know if you don't want to implement, and I can take this on.

@thareUSGS
Copy link
Author

Thanks for the up-vote. I will see what I can do for a pull request. I haven't yet assessed the impact. Since this may be a breaking change to the function, I was worried it might break existing workflows (or code). I haven't really searched around much for the function's use.

If you think the update is minor (or early on), I will happy request a pull with the two changes I proposed.

thanks.

@gadomski
Copy link
Member

Since this may be a breaking change to the function, I was worried it might break existing workflows (or code).

A new, optional argument with a default that keeps current behavior would be a feature-adding, non-breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants