Skip to content

Commit

Permalink
run ST_Buffer on output ST_SnapToGrid to fix exception occuring in ST…
Browse files Browse the repository at this point in the history
…_MakeValid
  • Loading branch information
arbakker committed Oct 27, 2020
1 parent f1303d3 commit 5afdc5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t-rex-core/src/datasource/postgis_ds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ impl PostgisDatasource {
),
"POLYGON" | "MULTIPOLYGON" | "CURVEPOLYGON" => {
format!(
"ST_CollectionExtract(ST_MakeValid(ST_SnapToGrid({}, {})),3)::geometry(MULTIPOLYGON,{})",
"ST_CollectionExtract(ST_MakeValid(ST_Buffer(ST_SnapToGrid({}, {})),3), 0.0)::geometry(MULTIPOLYGON,{})",
geom_expr,
layer.tolerance(zoom),
layer_srid
Expand Down

0 comments on commit 5afdc5a

Please sign in to comment.