Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

ST_StraightSkeleton returns degenerate line segments #143

Open
robe2 opened this issue Sep 9, 2017 · 1 comment
Open

ST_StraightSkeleton returns degenerate line segments #143

robe2 opened this issue Sep 9, 2017 · 1 comment

Comments

@robe2
Copy link
Contributor

robe2 commented Sep 9, 2017

PostGIS related ticket at: https://trac.osgeo.org/postgis/ticket/3835
returns some lines that are 0 length.

`
WITH bt(box) AS (
SELECT st_makebox2d(st_point(1296000,202400),st_point(1297000,212400))
)
SELECT d.path[1], St_astext(d.geom) , ST_Length(d.geom)
FROM bt, st_dump(
st_straightskeleton(st_difference(st_buffer(box,2000,2),box))
) as d
WHERE st_startpoint(d.geom) = st_endpoint(d.geom);

`

Outputs
`

path | st_astext | st_length
------+-------------------------------------------------------------------------------+-----------
17 | LINESTRING(1295198.91236738 201598.91236738,1295198.91236738 201598.91236738) | 0
20 | LINESTRING(1295198.91236738 213201.08763262,1295198.91236738 213201.08763262) | 0
22 | LINESTRING(1297801.08763262 201598.91236738,1297801.08763262 201598.91236738) | 0
23 | LINESTRING(1297801.08763262 213201.08763262,1297801.08763262 213201.08763262) | 0
(4 rows)

`

This is testing with SFCGAL master as of aa5c4d7

@lbartoletti
Copy link
Contributor

Confirmed with SFCGAL 1.3.7 / Postgis 3.0.1 and CGAL 5.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants