Skip to main content
Hello I'm trying to convert dxf files to postgis tables. In my dxf files polygons are stored into layers, they are lines but I can correctly convert them to polygons. There are many polygons (lines) layers distinguishing different kind of building (ex civil, industry, ecc). Each polygon is the area of adiacent/touching structures. These touching stuctures (let's say an industry shed and industry attached buildings) can have different height (different roofs). Each "roof sector" is set by a division polyline, there is a dxf polyline layer which contains all division polylines. So each of my polygon must be split in different polygons by division polylines, mantaining the code of the polygon splitted.. I'm getting crazy with this. Can anyone suggest me a way to solve it? Thanks Pietro
Hi Pietro,

 

 

Have you looked at the LineOnAreaOverlayer? It will split polygons defined by lines, while transferring the attributes between those that intersect.

 

 

Alternatively you could also look at the Intersector, which is a bit more general.

 

 

To transfer the attributes without modifiying the geometries, look at the SpatialRelator / SpatialFilter.

 

 

David
Hi Pietro,

 

 

As David mentions, I believe Intersector would be a solution. In addition, if it's possible to transform the poly-lines of 'roof sectors' into polygons by AreaBuilder or other transformers, Clipper or AreaOnAreaOverlayer would be also available.   David, I don't think LineOnAreaOverlayer splits polygons. Have I overlooked something?

 

 

Takashi
Hi Takashi,

 

 

you're absolutely right, the LineOnAreaOverlayer only splits the lines on the polygon boundaries, not the other way around. Thanks for the correction.

 

 

David
I'm trying... LineOnAreaOverlayer don't split polygons by lines. But can split my polylines by polygons if they overlap In my case poly-lines of 'roof sectors' don't cross the containing polygon limits, but they touch the limit. Let's say, It's like a single home. It's whole area is the polygon. Roof polylines are the inside walls that divide the home into rooms.

 

The intesector transformer works. It takes polygons and division polylines in input and the output is a polyline feature with the polygon boundary plus all division inside.

 

If I then use an areabuilder all polygons generate correctly, but they miss theoriginal polygon classification.

 

I think that I can use spatial relator to classify the new polygons by the old ones, using a "WITHIN" test.

 

Does it sounds good for you?

 

Thanks

 

p  
Hi,

 

 

Are you using the list option on the area builder? that should take care of propragating the attributes.

 

 

Hope this helps
Hi Pietro,

 

 

When using SpatialRelator to transfer attributes of old polygon to new polygons which are inside of the old polygon, I think using "WITHIN" test is good one.  And, in your case, "INTERSECTS" might be also available.

 

Try them and check the results!

 

 

Takashi
Hello everybody I made a workflow that seems to work, here it is:   http://imageshack.us/a/img9/3799/workflowy.png   My task is to generate buildings with their height attached. All geometries were in dxf files (more than 900) and I loaded all these dxf to a postgis db time ago with an OGR2OGR Python script. In this Postgis table all buildings are linear features (in a table with lots of other features) and height of buildings are in another postgis table (points). All building features are extracted in the uppermost part of the workflow schema and filtered by kind of building and roof separation (4L000DV layer - DiVision layer). All xA000xx are closed polylines, bounding polygon of any building (that can be split by 4L000DV division layer). In each building/part of building with different roof height there are 2 points, one with base and one with roof height (4P000QP/QG layers). Points are extracted by the second postgis reader and selected by layer code.   So, I used an areabuilder and a topologybuilder transformer to construct polygonal corrected buildings with layer code attached. Then I used an intesector transformer to intersect polygonal buildings with division polylines to obtain sectors of buildings that will have different heights. In this passage the original building layer code is mixed with the division layer code so the second areabuilder produces polygons with mixed codes, some of them named with the building layer code and some with the 4L000DV code.. So I used a spatialrelator to attach each polygon building code to the parts it was splitted.   On the second part I extracted the base and roof height, I attached the z value and then I used a second spatial relator to attach the 2 height to each building polygon part coming from the first spatialrelator transformer.   Does it make sense to you? Thank you Pietro

Reply