Skip to main content
Solved

create a polygon from many lines inside it.

  • February 28, 2023
  • 6 replies
  • 23 views

f.kemminje
Contributor
Forum|alt.badge.img+11

I've got walls. dgn file. In the source dgn file, there are numerous lines that are utilized to form walls.

I wanted to combine all these different lines into a straightforward wall. so I joined manually the outermost wall line to create a walls shape/polygon.

In the attached sample file , source features and One straightforward wall feature is created in "merged wall" level/layer number 2(blue color) for ref. I just drew one simple polygon feature how the expected feature looks like. . Please, if someone can assist me.

Best answer by nielsgerrits

f.kemminje wrote:

Many thanks to @nielsgerrits​  for his prompt /fast response. I examined the results, but they were exactly what I was expecting, but some area results are different. I made fruitless attempts to modify various transformers. I've included a screen image that demonstrates the problem features.

Not sure why these are not being filled. There is probably logic to be found if you debug enough. It is probably quicker to implement the same technique to force some areas to be filled.

View original
Did this help you find an answer to your question?

6 replies

nielsgerrits
VIP

One way to do this is create lines from input, intersect, snap, build areas, exclude unwanted areas and dissolve.

 

Attached a workspace which does this. When I do this I look for a simple way to exclude areas. From the Data Inspector it is easy to right click and copy a ground coordinate to create a point in an area you want to exclude. This can be added to the list of coordinates in the AttributeCreator to exclude the area down the line. Iterate until you are happy.


f.kemminje
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • March 1, 2023
nielsgerrits wrote:

One way to do this is create lines from input, intersect, snap, build areas, exclude unwanted areas and dissolve.

 

Attached a workspace which does this. When I do this I look for a simple way to exclude areas. From the Data Inspector it is easy to right click and copy a ground coordinate to create a point in an area you want to exclude. This can be added to the list of coordinates in the AttributeCreator to exclude the area down the line. Iterate until you are happy.

Many thanks to @nielsgerrits​  for his prompt /fast response. I examined the results, but they were exactly what I was expecting, but some area results are different. I made fruitless attempts to modify various transformers. I've included a screen image that demonstrates the problem features.


nielsgerrits
VIP
  • Best Answer
  • March 1, 2023
f.kemminje wrote:

Many thanks to @nielsgerrits​  for his prompt /fast response. I examined the results, but they were exactly what I was expecting, but some area results are different. I made fruitless attempts to modify various transformers. I've included a screen image that demonstrates the problem features.

Not sure why these are not being filled. There is probably logic to be found if you debug enough. It is probably quicker to implement the same technique to force some areas to be filled.


f.kemminje
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • March 1, 2023
f.kemminje wrote:

Many thanks to @nielsgerrits​  for his prompt /fast response. I examined the results, but they were exactly what I was expecting, but some area results are different. I made fruitless attempts to modify various transformers. I've included a screen image that demonstrates the problem features.

Thank You!very much @nielsgerrits​ 


f.kemminje
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • March 2, 2023
f.kemminje wrote:

Many thanks to @nielsgerrits​  for his prompt /fast response. I examined the results, but they were exactly what I was expecting, but some area results are different. I made fruitless attempts to modify various transformers. I've included a screen image that demonstrates the problem features.

@nielsgerrits​ I have about 20 drawings just like this. For all of the drawings, I cannot run the same fme script. because this FMW file's hardcoded points list coordinates. Making a universal FMW that will construct walls for all files is the difficult part of this.


nielsgerrits
VIP
f.kemminje wrote:

Many thanks to @nielsgerrits​  for his prompt /fast response. I examined the results, but they were exactly what I was expecting, but some area results are different. I made fruitless attempts to modify various transformers. I've included a screen image that demonstrates the problem features.

I agree. I would just fix one drawing, clear the coordinate lists for ignoring and forcing area's and do it again for the next one. Yes it will take time. Yes it will be a lot faster than do it all by hand in the native software.

 

If you have many more files to transform it will pay off to work on a better workspace, but if you're time crunched and need the job done, my experience this is the way to go.

 

When I get a request to automate something I always ask myself, how much features or actions do I need to process? 10 or 100 or 1000? If 10, do it by hand. If 1000, automate. If 100, it really depends on the amount of work per feature, but manual work is probably faster.

 

Randall Munroe (XKCD) created something about this:

automation


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings