0

I have a problem with the poligonization.

I have a table that contains the my borderstones. The second table defines the next and previous point. It is important because these are attribute datas.

Borderstones [srid=23700]

enter image description here

Direction

enter image description here

//the "allaspont" mean the borderstone_id

After that I created a VIEW, ther resoult:

CREATE OR REPLACE VIEW view_linestring AS SELECT w.id, w.szama, ST_SetSRID(ST_MakeLine((select ST_AsText(geom) from borderstone where id = c.allaspont) , (select ST_AsText(geom) from hatarko2 where id = c.kovetkezo)),23700) as geom FROM hatarko2 w, direction c WHERE w.id = c.id;

The resoult in qgis: These are linestrings between two point. enter image description here

I created a queries which retrive a polygon but it has no id so the qgis can not handle.

SELECT ST_Polygonize(geom) As geom FROM (SELECT * FROM public.view_linestringeov) As foo;

I need two create one polygon which is the border of my territories. Any idea?

  • 1
    Generally speaking if you need to create an id you can always just add row_number() over() as id or fix the original table so that it has an id to select. Don't use ST_AsText(geom), you don't want your geom as text when passing to other functions. Finally, your question is not very clear. – John Powell Oct 27 '15 at 11:52
  • So I have a table which contain the border stones with their attributes. The second table is contain the direction. The previous and the next landmark for each stone. At first I created line strings between each neighbor border stones. This tables represent a village border and I'd like to create a polygon from these data. – Kgerg0 Oct 28 '15 at 11:04

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.