[postgis-users] writing loop and conditionals in pl/pgsql

2014-03-05 Thread mane moshref
Hi all, I am quite new to pl/pgsql and completely confused. I have two tables. One storing height category including hk_id(height category id), h_min and h_max. and a table including several plygons having y_max and height. My aim is to know on which height category the plygon locates based on

Re: [postgis-users] writing loop and conditionals in pl/pgsql

2014-03-05 Thread mane moshref
Thanks guys.   But first of all I have to do this with pl/pgsql. This is not the matter of having answer in my db. It is the matter of solving problem with pl/pgsql.   Rémi-C thank you for the link. I already went through it but it just explain very basic structure. I couldn't find my answers

[postgis-users] merge partial intersected polygons in one table

2014-03-03 Thread mane moshref
Hi all, I have a table including FID, parcel_id, coverage_id and geom. I want to find those polygons which have a partial intersect with the same parcel_id and coverage_id and union the intersected ones as One polygon. For example if I have 6 polygons with the same parcel_id and coverage_id

[postgis-users] How can I add one column to the table in my existing query?!

2013-07-25 Thread mane moshref
Hi all, I have one question. I wrote this query in my java code: CREATE table many_line AS SELECT ST_AsText(St_makeline(sp, ep)) as line, gmlid, parent_id, root_id from (select st_pointN(geom, generate_series(1, ST_NPoints(geom)-1)) as sp, ST_PointN(geom, generate_series(2, ST_NPoints(geom)  ))