fix LineString serialization
This commit is contained in:
parent
96dc678fe6
commit
e93b9dc222
1 changed files with 1 additions and 1 deletions
|
@ -143,7 +143,7 @@ class SVGImage:
|
||||||
for ring in chain((geom.exterior,), geom.interiors))
|
for ring in chain((geom.exterior,), geom.interiors))
|
||||||
+ '"/>').replace('.0 ', ' ')
|
+ '"/>').replace('.0 ', ' ')
|
||||||
if isinstance(geom, LineString):
|
if isinstance(geom, LineString):
|
||||||
return (('<path d="M %.1f %.1f L'+(' %.1f %.1f'*(geom.coords-1))+'"/>') %
|
return (('<path d="M %.1f %.1f L'+(' %.1f %.1f'*(len(geom.coords)-1))+'"/>') %
|
||||||
tuple((np.array(geom)*self.np_scale+self.np_offset).flatten())).replace('.0 ', ' ')
|
tuple((np.array(geom)*self.np_scale+self.np_offset).flatten())).replace('.0 ', ' ')
|
||||||
try:
|
try:
|
||||||
geoms = geom.geoms
|
geoms = geom.geoms
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue