3
我有以下的多邊形在PostGIS的如何將adjactent多邊形合併到1個多邊形並保留最小/最大數據?
每個多邊形有場「數據」值。 我想自動合併相互接觸的多邊形: 1-2和3-4-5-6-7
另外,如果可能我希望從每個列的最小/最大值多邊形保持新的多邊形
Id Data Geom
1 8.45098 MULTIPOLYGON(((178253.411393551 665205.232423685,178248.411393552 665205.232423685,178248.411393552 665210.232423684,178253.411393551 665210.232423684,178253.411393551 665205.232423685)))
2 10.7918 MULTIPOLYGON(((178258.411393551 665205.232423685,178253.411393551 665205.232423685,178253.411393551 665210.232423684,178258.411393551 665210.232423684,178258.411393551 665205.232423685)))
3 10.7918 MULTIPOLYGON(((178263.411393552 665185.232423682,178258.411393551 665185.232423682,178258.411393551 665190.232423685,178263.411393552 665190.232423685,178263.411393552 665185.232423682)))
4 10.4139 MULTIPOLYGON(((178268.411393553 665185.232423682,178263.411393552 665185.232423682,178263.411393552 665190.232423685,178268.411393553 665190.232423685,178268.411393553 665185.232423682)))
5 7.448 MULTIPOLYGON(((178263.411393552 665180.232423684,178258.411393551 665180.232423684,178258.411393551 665185.232423682,178263.411393552 665185.232423682,178263.411393552 665180.232423684)))
6 10.2318 MULTIPOLYGON(((178268.411393553 665180.232423684,178263.411393552 665180.232423684,178263.411393552 665185.232423682,178268.411393553 665185.232423682,178268.411393553 665180.232423684)))
7 10.998 MULTIPOLYGON(((178263.411393552 665175.232423685,178253.411393551 665175.232423685,178253.411393551 665180.232423684,178258.411393551 665180.232423684,178263.411393552 665180.232423684,178263.411393552 665175.232423685)))
8 10.7548 MULTIPOLYGON(((178263.411393552 665175.232423685,178253.411393551 665175.232423685,178253.411393551 665180.232423684,178258.411393551 665180.232423684,178263.411393552 665180.232423684,178263.411393552 665175.232423685)))
會是怎樣做到這一點的最簡單的方法(我在QGIS/ArcMap中的小知識,更好地瞭解在PostGIS)?
我已經更新了我原來的錯誤答案。我張貼沒有檢查,因爲不在電腦前,對此感到遺憾。 – 2014-11-25 15:19:51
謝謝您的時間來回答這個問題,我對postgres很陌生,語法很奇怪(來自mssql),稍後我會對其進行回顧。 Thx !!!! – Alophind 2014-11-25 22:58:00
:-)我也來自MySQL,所以我明白你來自哪裏的語法是很奇怪的評論。對於空間(以及其他一些事情),Postgres/Postgis一旦適應了MySQL,就會將MySQL拋出水面。對於它的價值,像Oracle和SQL Server也支持像CTE(WITH queries)這樣的東西,所以它真的是奇怪的MySQL。 – 2014-11-25 23:02:15