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

ST_StraightSkeleton returns degenerate line segments #143

@robe2

Description

@robe2

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions