Fix extra vertex added during OASIS loading
This commit is contained in:
parent
8edb7b0956
commit
afcbd315ae
@ -283,7 +283,10 @@ def read(
|
|||||||
|
|
||||||
# Switch based on element type:
|
# Switch based on element type:
|
||||||
if isinstance(element, fatrec.Polygon):
|
if isinstance(element, fatrec.Polygon):
|
||||||
vertices = numpy.cumsum(numpy.vstack(((0, 0), element.get_point_list())), axis=0)
|
# Drop last point (`fatamorgana` returns explicity closed list; we use implicit close)
|
||||||
|
# also need `cumsum` to convert from deltas to locations
|
||||||
|
vertices = numpy.cumsum(numpy.vstack(((0, 0), element.get_point_list()[:-1])), axis=0)
|
||||||
|
|
||||||
annotations = properties_to_annotations(element.properties, lib.propnames, lib.propstrings)
|
annotations = properties_to_annotations(element.properties, lib.propnames, lib.propstrings)
|
||||||
poly = Polygon(vertices=vertices,
|
poly = Polygon(vertices=vertices,
|
||||||
layer=element.get_layer_tuple(),
|
layer=element.get_layer_tuple(),
|
||||||
|
Loading…
Reference in New Issue
Block a user