GeoMedia Discussions

Search for an answer, post a question, or answer other users' questions in our GeoMedia support discussions. This discussion board is a great way to collaborate with industry peers around the world. It is intended for discussion and support of the GeoMedia Desktop and Add-on applications.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Occasional Contributor
Posts: 11
Registered: ‎04-20-2020

create polygon from lines

[ Edited ]

Hello everyone,

I have lines that I need to convert to polygon. 

I could do that using Insert area by face, but it doesn't work if the line is not self-contained. 

I tried to check the geometry using Connectivity tools, but it didn't help. 

 

I attach the picture of my data and .mdb file itself. 

Highlighted
Technical Evangelist
Posts: 206
Registered: ‎02-02-2016

Re: create polygon from lines

To close the large gap between the endpoint and startpoint of the linework as shown in the screenshot you can create a Functional Attribute Query for the lIne feature class using an Expression such as:

 

CREATEPOLYLINE(ENDPOINT(Input.Geometry), STARTPOINT(Input.Geometry))

 

This will create a straight line between the start point and the end point of the unclosed lines, so that when the line work is added to a select set you have a closed boundary thus allowing you to use 'Insert Area By Face' to create an area.

 

Hope this helps.

Highlighted
Occasional Contributor
Posts: 11
Registered: ‎04-20-2020

Re: create polygon from lines

Thank you for your suggestion

It works, but since we have hundreds of layers, I am trying to find shorter way (then select each line - create query - use that query along with the origional line layers). Also I am traying to understand whether it is possible to copy attributes value from  two lines that made a polygon (while using Insert Area By Face tool)? 

Highlighted
Staff
Posts: 156
Registered: ‎05-26-2016

Re: create polygon from lines

Use this functional Attribute

 

CREATEPOLYGON(POINTS(Input.Geometry))

 

Works for me.Capture.JPG

Highlighted
Staff
Posts: 156
Registered: ‎05-26-2016

Re: create polygon from lines

Highlighted
Occasional Contributor
Posts: 11
Registered: ‎04-20-2020

Re: create polygon from lines

Thank you for your answer. I already tried this functionals attributes. But in this case I got polygons that are formed from two adjacent lines, but the whole inner polygon. Please see the picture attached. 

Highlighted
Staff
Posts: 156
Registered: ‎05-26-2016

Re: create polygon from lines

[ Edited ]

Sorry but i don't understand what you are showing.  You have 166 lines  and you are producing 166 polygons. Each is unique, Thats correct, there is no sharing of adjacent lines  !   Need more explaination

 

Just another question. I assumed these lines are Isolines(contours) of uniform Z value. However they are Not. Z changes along lines.What are these lines? Z ?

 

Capture2.JPG

 

Highlighted
Occasional Contributor
Posts: 11
Registered: ‎04-20-2020

Re: create polygon from lines

[ Edited ]

Hi,

I attached 3 pictures:

  1. Original lines that were used for polygon creation
  2. Polygons that were created using Insert Area by face (geometrically it is what I need, but in this case I have to 1)create lines in order to close the gap between some lines 2) to calculate an attribute that would contain avarage from original lines  
  3. Polygons that were created using FA createpolygon(points(Geometry)) (the geometry is not suit for my purposes) 

It is countours of dessimination of chemical element, not elevation. 

 

Thank you for the assistance.

Highlighted
Staff
Posts: 156
Registered: ‎05-26-2016

Re: create polygon from lines

I understand, You want the Intersection polygon between the neighbours.

1, Analytical Merge the new polygons, based on the Attribute value (ie 0.1,etc) – the_value

2, Update Attribute using SETZ(Input.poly, Input.the_value), so I overwrite existing value and set height of polygons to (ie 0.1,0.2 etc)

3, Do a Functional Attribute of the Merged Polygons  the_value_minus_point_one = Input.the_value - 0.1

4, Do a Join - Join of Merge_polygons and FA of Merge_polygons where the_value = the_value_minus_point_one

Now you have the inner and outer bounding polygons

You can save them and do an Attribute Query for each value (0.1, 0.2,etc..) or you can Do an Attribute Query on the Join doing the same. These will bring up the inner and outer polygons for this value. Select them (Yes this is manually done 27 times 0.1 to 2.8)

Now do an Insert Area By Face for each. As I stored the_value as the ‘Z’, a functional attribute of Z+0.05 will give you the intersection attribute

 

See PDF

 

Highlighted
Occasional Contributor
Posts: 11
Registered: ‎04-20-2020

Re: create polygon from lines

Hello, 

Thank you for the suggestion, but it is not clear for me what to do:

  1. I used Polygons that was created by CTREATEPOLYGON FA (there are 166 polygons)
  2. When I merged them - I got 28 (but I need to maintain the number)
  3. Update Attribute using SETZ - should I use FA for that? 
  4. I tried to do that (step 3 was done using FA) and I got 3 attributes: value, value1 and the_value_minus_point_one. But I didn't get inner and outer polygons. What type of joining should I use ? 
  5. I tried to use Insert Area By Face, but still it doesn't maintain attributes from Join quiery.