Vendoring descartes? (or take over functionality)
See original GitHub issueTriggered by https://github.com/conda-forge/geopandas-feedstock/pull/59, where matplotlib and descartes are removed from the packages that are automatically installed for geopandas (note: only for conda of course, not for pip), I was wondering if it would be an idea to vendor descartes. In the end, it is less than 100 lines of code and rather stable (not much changes over the last years).
Reason I was thinking this: people installing geopandas will quite often have matplotlib installed as well. But, plotting (polygons) still does not work out of the box in such a case, for that people have to install descartes as well. It would be nice if plotting “just works” (in case if matplotlib is already installed of course).
On the other hand, doing a conda/pip install descartes
is also not that hard (it’s an easy pure python package to install), certainly if we give a good error message.
And you could say the same for mapclassify …
cc @sgillies
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:16 (15 by maintainers)
Top GitHub Comments
PR is merged, so with the next geopandas release, we will no longer require
descartes
for plotting polygons!A note to people / other pojects using the
descartes
package directly: it is no longer maintained, so you should best stop using it as well (@sgillies indicated above he doesn’t intent to make more releases, and the repo on bitbucket also got lost in bitbucket’s aggressive mercurial sunsetting). Now, the alternattive is only a few lines with matplotlib for a polygon:(for multipolgyon, need to repeat the compound path for each part)
Getting back to this. After seeing the discussion in https://github.com/matplotlib/matplotlib/issues/16662 it seems that the best solution would be to include that snippet above in geopandas.