Skip to main content
added 6 characters in body
Source Link

An approach that works for me, based on the answer of @hornbydd, is:

merged = MultiLineString([linestring for linestring in multilinestring]multilinestring.geoms] + [candidate])

…where candidate is a LineString.

But, it feels wrong to write a list-comprehension when I just want to something like:

newmultilinestring = oldmultilinestring + candidate

An approach that works for me, based on the answer of @hornbydd, is:

merged = MultiLineString([linestring for linestring in multilinestring] + [candidate])

…where candidate is a LineString.

But, it feels wrong to write a list-comprehension when I just want to something like:

newmultilinestring = oldmultilinestring + candidate

An approach that works for me, based on the answer of @hornbydd, is:

merged = MultiLineString([linestring for linestring in multilinestring.geoms] + [candidate])

…where candidate is a LineString.

But, it feels wrong to write a list-comprehension when I just want to something like:

newmultilinestring = oldmultilinestring + candidate

Source Link

An approach that works for me, based on the answer of @hornbydd, is:

merged = MultiLineString([linestring for linestring in multilinestring] + [candidate])

…where candidate is a LineString.

But, it feels wrong to write a list-comprehension when I just want to something like:

newmultilinestring = oldmultilinestring + candidate