A set of postgis functions to manipulate, subdivide, and pointify geometries...
All so that you can answer the all important question:
Does the pope shit in the woods?
If you're snapping to node on exterior coordinates, you wouldn't know it.
Reduces a geometry to a set of points comprising a simplified perimeter and interior points every "size_in_meters".
Example:
-- return a set of points
select pointify_geom(the_geom,20) from some_table;
-- generate a geojson
select st_asgeojson(st_collect(g)) from (select pointify_geom(the_geom,20) as g from some_table where id=123) t;
Chops up a geometry into "size_in_meters" squares, returning a set of geometries contained within the boundaries.
Example:
-- return a set of 20m square geometries (or intersecting subset) inside the_geom
select pointify_geom(the_geom,20) from some_table;
-- generate a geojson
select st_asgeojson(st_collect(g)) from (select gridify_geom(geometry,20) as g from
some_table where id=123) t;
Projects your geometry to one that's friendly to meters (vs radians, furlongs, cubits, etc.), buffers, and then projects back.
Example:
-- produce a geometry with a 20 meter buffer
select st_buffer_meters(the_geom,20) from some_table;
Projects your geometry to one that's friendly to meters, segmentizes, and then projects back.
Example:
-- segmentize a geometry with a 20 meter maximum segment length
select st_segmentize_meters(the_geom,20) from some_table;
depends on (included) utmzone.sql