Skip to content

Cut sequences with too long segments

To avoid hideous artefacts on the map, we may cut sequences geometries when a segment in it is too long (> 100m).

@cquest did a first request to proceed

select
   id as i,
   st_linemerge(st_collect(segment)) as g
from (
   select
      (st_dumpsegments(geom)).geom as segment,
      id
   from sequences
   where id = '5fc5da8d-0780-42be-aaa0-9dba52dacf56'
) as s
where st_length(segment::geography)<100
group by id;

We may implement:

  • Check on sequence post-process after upload
  • A SQL migration to update an instance existing stock
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information