Skip to content

Commit

Permalink
preserving topology while simplifying polygon
Browse files Browse the repository at this point in the history
  • Loading branch information
edisonguo committed Mar 21, 2019
1 parent 945f070 commit b300412
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mas/api/mas.sql
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,10 @@ create or replace function mas_intersects(
end if;

if ST_NPoints(in_geom) > 100 and identity_tol >= 0 and dp_tol >= 0 then
mask := ST_Simplify(ST_RemoveRepeatedPoints(in_geom, identity_tol), dp_tol);
mask := ST_SimplifyPreserveTopology(ST_RemoveRepeatedPoints(in_geom, identity_tol), dp_tol);
if mask is null then
mask := in_geom;
end if;
else
mask := in_geom;
end if;
Expand Down

0 comments on commit b300412

Please sign in to comment.