ignore invalid rings in svg import
This commit is contained in:
parent
9582e8013d
commit
b88e9401aa
1 changed files with 2 additions and 0 deletions
|
@ -175,6 +175,8 @@ class Command(BaseCommand):
|
|||
changed_geometries.reset()
|
||||
for path in svg.findall('.//svg:path', namespaces):
|
||||
for polygon in self.parse_svg_data(path.attrib['d']):
|
||||
if len(polygon) < 3:
|
||||
continue
|
||||
polygon = Polygon(polygon)
|
||||
polygon = scale(polygon, xfact=1, yfact=-1, origin=(0, svg_height/2))
|
||||
polygon = scale(polygon, xfact=width / svg_width, yfact=height / svg_height, origin=(0, 0))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue