a guest Oct 16th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. This query identifies OSM polygonal features that have not changed between two time slices.
  3. - The OSM ID should be identical
  4. - The geometry should be identical
  5. */
  6. CREATE TABLE results_final.polygonal_no_change AS
  7.   SELECT t_1.osm_id_all   AS osm_id_t1,
  8.          t_2.osm_id_all   AS osm_id_t2,
  9.          t_1.all_tags     AS all_tags_t1,
  10.          t_2.all_tags     AS all_tags_t2,
  11.          t_1.source       AS source_t1,
  12.          t_2.source       AS source_t2,
  13.          t_1.wkb_geometry geom_t1,
  14.          t_2.wkb_geometry geom_t2
  15.   FROM   mn_2011_upload.multipolygons_new t_1,
  16.          mn_2019_upload.multipolygons_new t_2
  17.   WHERE  t_1.osm_id_all = t_2.osm_id_all
  18.          AND St_equals(t_1.wkb_geometry, t_2.wkb_geometry);
  20. CREATE TABLE results_final.polygonal_no_change_nhd AS
  21.   SELECT *
  22.   FROM   results_final.polygonal_no_change
  23.   WHERE  Lower(source_t1) LIKE '%nhd%';
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand