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

remove R dependency #21

Closed
mgiraldo opened this issue Jul 15, 2014 · 2 comments
Closed

remove R dependency #21

mgiraldo opened this issue Jul 15, 2014 · 2 comments

Comments

@mgiraldo
Copy link
Contributor

I originally used R because I found code that reduces the amount of corners in a geographic polygon: http://rpubs.com/geospacedman/alphasimple

The function in the vectorizer is:
https://github.com/NYPL/map-vectorizer/blob/9b9129b9d135c89b350700549794e7d0f2348af2/vectorize_map.py#L227

and the R code:
https://github.com/NYPL/map-vectorizer/blob/9b9129b9d135c89b350700549794e7d0f2348af2/simplify_map.R

Ideally, we would eliminate R and have python code that produces the same output as R (one shapefile for each polygon that was simplified that is within the area threshold).

A shapefile-per-polygon is produced (thousands!) because it was the only way I could pass data from python-to-R-and-back but was also useful to find the average color of the polygon.

@tlevine
Copy link
Contributor

tlevine commented Jul 18, 2015

Is this a duplicate of issue #12?

Also, you only needed shapefiles to communicate between R and Python; the shapes can stay in memory if it's just Python.

@mgiraldo
Copy link
Contributor Author

correct

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