-
Notifications
You must be signed in to change notification settings - Fork 3
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
Shapefile bugfixes #146
Conversation
- Make it work with dotted file names e.g. a.b.shp instead of just a.shp - Add option to check for number of exact shapefile files - Check for presence of `.dbf` and `.shx` files - General cleanup
|
||
result = [] | ||
for item in geom_object_list: | ||
if settings.TASKING_SHAPEFILE_IGNORE_INVALID_TYPES: |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, will do this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now, done
272f621
to
eb78799
Compare
Fix: #145