add fig5
This commit is contained in:
parent
671a680277
commit
1224fddcec
@ -15,6 +15,7 @@ drop table if exists figures;
|
||||
create table figures (name text, way geometry);
|
||||
insert into figures (name, way) values ('fig3', ST_GeomFromText('LINESTRING(0 0, 12 0, 13 4, 20 2, 20 0, 32 0, 33 10, 38 16, 43 15, 44 10, 44 0, 60 0)'));
|
||||
insert into figures (name, way) values ('fig3-1', ST_GeomFromText('LINESTRING(0 0, 12 0, 13 4, 20 2, 20 0, 32 0, 33 10, 38 16, 43 15, 44 10, 44 0)'));
|
||||
insert into figures (name, way) values ('fig5', ST_GeomFromText('LINESTRING(0 39,19 52,27 77,26 104,41 115,49 115,65 103,65 75,53 45,63 15,91 0,91 0)'));
|
||||
|
||||
do $$
|
||||
begin
|
||||
|
12
wm.sql
12
wm.sql
@ -1,11 +1,8 @@
|
||||
\set ON_ERROR_STOP on
|
||||
SET plpgsql.extra_errors TO 'all';
|
||||
|
||||
-- detect_bends detects bends using the inflection angles. It does not do corrections.
|
||||
create or replace function detect_bends(line geometry) returns table(bend geometry) as $$
|
||||
/* for each bend, should return:
|
||||
- size (area)
|
||||
- shape (cmp, compactness index)
|
||||
*/
|
||||
declare
|
||||
pi real;
|
||||
p geometry;
|
||||
@ -45,3 +42,10 @@ begin
|
||||
end if;
|
||||
end
|
||||
$$ language plpgsql;
|
||||
|
||||
|
||||
-- fix_gentle_inflections moves bend endpoints in case of gentle inflections
|
||||
create or replace function fix_gentle_inflections(line geometry) returns table(bend geometry) as $$
|
||||
begin
|
||||
end
|
||||
$$ language plpgsql;
|
||||
|
Loading…
Reference in New Issue
Block a user