CosmiQ / solaris

CosmiQ Works Geospatial Machine Learning Analysis Toolkit
https://solaris.readthedocs.io
Apache License 2.0
414 stars 112 forks source link

hotfix split_multi_geoms() #340

Closed nrweir closed 4 years ago

nrweir commented 4 years ago

Thank you for submitting your PR. Please read the template below, fill it out as appropriate, and make additional changes to your code as needed. Please feel free to submit your PR even if it doesn't satisfy all of the requirements below - simply prepend [WIP] to the PR title until it is ready for review by a maintainer. If you need assistance or review from a maintainer, add the label Status: Help Needed or Status: Review Needed respectively. After review, a maintainer will add the label Status: Revision Needed if further work is required for the PR to be merged.

Description

sol.utils.geo.split_multi_geometries() was broken because it wasn't dropping multigeometries when it split them - it was simply adding each individual sub-geometry to the gdf, but preserving the "parent" multigeom. This is fixed here.

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Please describe tests that you added to the pytest codebase (if applicable).

Checklist:

If your PR does not fulfill all of the requirements in the checklist above, that's OK! Just prepend [WIP] to the PR title until they are all satisfied. If you need help, @-mention a maintainer and/or add the Status: Help Needed label.

nrweir commented 4 years ago

Unfortunately the travis builds are currently failing because Travis can't seem to install dev versions of projects. I'm going to merge anyway, as I'm able to complete the pip install and run all the pytests successfully.