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

Shapefile bugfixes #146

Merged
merged 22 commits into from
Feb 26, 2019
Merged

Shapefile bugfixes #146

merged 22 commits into from
Feb 26, 2019

Conversation

moshthepitt
Copy link
Contributor

Fix: #145

@moshthepitt moshthepitt self-assigned this Feb 25, 2019
@moshthepitt moshthepitt changed the title Shapefile bugfixes [DNM] Shapefile bugfixes Feb 25, 2019

result = []
for item in geom_object_list:
if settings.TASKING_SHAPEFILE_IGNORE_INVALID_TYPES:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the invalid types? MultuPolygons? Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid Types are anything other than Polygons - the ones we know about so far are MultiPolygons and Points.

They are invalid because multipolygon = MultiPolygon(polygons) fails if polygons contains anything other than Polygon objects.

if ignore_invalid:
pass
else:
results.append(multipolygon_obj)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The if-block could be simpler I think.

if not ignore_invalid:
   results.append(multipolygon_obj)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, will do this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now, done

@moshthepitt moshthepitt changed the title [DNM] Shapefile bugfixes Shapefile bugfixes Feb 26, 2019
@moshthepitt moshthepitt merged commit 932a5ba into master Feb 26, 2019
@moshthepitt moshthepitt deleted the shapefile-bugfixes branch February 26, 2019 07:39
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

Successfully merging this pull request may close these issues.

2 participants