Closed grndng closed 2 years ago
I have the same problem, have you solved it?
Exact same issue here. For example a very simple rectangle poly
POLYGON ((3566.87 4690.537, 3736.966 4690.537, 3654.495 15.463, 3489.553 10.309, 3566.87 4690.537))
gives thousands of coordinates of
MULTILINESTRING ((3511.536846846467 32.61758209752352, 3511.206142601772 32.28447243294296), (3511.051979175112 32.12549654544849, 3511.206142601772 32.28447243294296),...........
Literally 20 pages of coordinate.
Something isn't right
I have the same problem, have you solved it?
I don't have any real solution. However, the "extensions" are leftovers of the tesellation if that helps. I was working on a proof of concept kind of thing that got stuck due to multiple other reasons so I've stopped using centerlines altogether. Sorry!
There's no way around it (that I'm aware of) other than adjusting the density parameter and trimming the excess branches.
Hey there,
when I run the centerline method on a rather simple, rectangular Polygon, I unforunately get not only one but several hundred or even thousand LineString objects grouped together as a MultiLineString object. At least with shapely I haven't been able to a) merge, union or dissolve the objects to receive a single LineString or b) split a Polygon with the LineString I'm trying to create.
The bigger problem, however, is that I'm not getting a clean, straight line as shown in the example but a skeleton-like LineString. I'm attaching an image of the Polygon and the LineString I'm getting by running
Centerline(my_polygon)
.Looking at my result I wonder whether I'm doing something wrong?