Skip to content

Instantly share code, notes, and snippets.

@demiurg
Last active August 29, 2015 14:05
Show Gist options
  • Save demiurg/93169ddaf54986ae3704 to your computer and use it in GitHub Desktop.
Save demiurg/93169ddaf54986ae3704 to your computer and use it in GitHub Desktop.
--- update fcpf_subnat_cea set geom_simple = st_simplify(st_buffer(st_buffer(st_simplify(wkb_geometry, 200), 200), -200), 2000) where hasc_1 = 'CL.MA';
--- update fcpf_subnat_cea set geom_simple = ST_MULTI(st_buffer(st_simplify(st_buffer(st_buffer(wkb_geometry, 500), -500), 2000), 0)) where not st_isvalid(geom_simple);
--- select hasc_1, uniquename, BIT_LENGTH(geom_simple::bytea)::int, st_isvalid(geom_simple) from fcpf_subnat_cea order by bit_length desc;
-- update fcpf_subnat_cea set geom_simple = ST_MULTI(st_buffer(st_simplify(st_buffer(st_buffer(st_simplify(wkb_geometry, 300), 500), -500), 2000), 0)) where hasc_1 = 'CL.AI' or hasc_1 = 'CL.MA';
-- select hasc_1 from fcpf_subnat_cea where not st_isvalid(geom_simple) or st_area(geom_simple) < 1;
update fcpf_subnat_cea set geom_simple = ST_MULTI(st_buffer(st_simplify(st_buffer(st_buffer(st_simplify(wkb_geometry, 300), 500), -500), 2000), 0)) where not st_isvalid(geom_simple) or st_area(geom_simple) < 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment