AutoCAD Map 3D Forum
Welcome to Autodesk’s AutoCAD Map 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Converting 2D polylines with fixed width to polygons

20 REPLIES 20
Reply
Message 1 of 21
nomisc
2488 Views, 20 Replies

Converting 2D polylines with fixed width to polygons

Hi folks,

 

I've done a search and couldn't find a previous post similar to mine, so here it goes. Apologies if it has been asked

before.

I've been sent a series of CAD drawings in which the author has used global width to define the appearance of features. I need to import this into our GIS, which for reasons too complex to bother with won't import any attributes such as width. I don't want to lose the information recorded so was wondering if it's possible to create a closed polygon to represent the shape of the line. I guess something might be possible using buffering, but I can't figure out how to use the existing line width.

Ta

20 REPLIES 20
Message 2 of 21
antoniovinci
in reply to: nomisc

You have some ways to achieve it, either with wide polylines and donuts.
The cleverest one, in my opinion, is _MAPEXPORT to a linear shapefile, adding the following attribute:

 

Message 3 of 21
nomisc
in reply to: antoniovinci

Thanks for that, but I don't see how it has helped unless I've misunderstood what it does. When I import the shape file into our GIS it loses the attributes so I'm back to square one. I realise the problem lies with our GIS, but that's what I have to work with.

Message 4 of 21
antoniovinci
in reply to: nomisc

When you import in your Gis such a shapefile, you'll see the attribute Ewidth in its TOC (Table of Contents), which you can stylize your data with: you'd better speak with one of your Gis collegues, sir.

Message 5 of 21
nomisc
in reply to: antoniovinci

Unfortunately when the data is imported, (for reasons I don't understand, but have to live with) all attribute data is stripped off so I need something that actually creates a polygon in CAD.Smiley Frustrated

Message 6 of 21
Alfred.NESWADBA
in reply to: nomisc

Hi,

 

what version of Map3D do you have?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 7 of 21
nomisc
in reply to: nomisc

Hi Alfred,

 

It's Map3D 2011

Message 8 of 21
antoniovinci
in reply to: nomisc


nomisc wrote:

Unfortunately when the data is imported ... all attribute data is stripped off

 

They are stripped off 'cause you forget to force the creation of Object Data (please Alfred, show him how, since at home I'm acadless...)

Message 9 of 21
nomisc
in reply to: antoniovinci

No, it's not as simple as that. I know how to attach data and in all other situations it's fine. The problem is that the GIS is part of the corporate network and when data is added in the format that it needs to be added so that the linkages with the rest of the database occur all data apart from the layer, which has to be the UID of the object being linked is lost. Please, this is not a GIS issue, or rather it is, but one that cannot be fixed. Please can you accept that the issue cannot be resolved by having attributes attached to a line. Unless you want to start discussions with our corporate GIS I need a way to do this and create a polygon in CAD? If the answer is no then I'll accept it, but it just strikes me that it ought to be possible. Sorry if I'm getting frustrated.

Message 10 of 21
Alfred.NESWADBA
in reply to: nomisc

Hi,

 

now I'm unsure what the goal behind really is, sorry (and don't get more frustrated!)

 

First you wrote that you get dwg-files using polylines with polyline-widths where you like to convert the polyine with width to a polygon that shows the border around the polyline-width (at least that was how I understood the original post).

For that my workflow would be:

  • create a topology from these lines
  • query this topology with the buffer-analysis and use the the half of the polyline-globalwidth as buffer-distance
  • finished

What I now don't understand is the last message with:

>> when data is added in the format that it needs to be added

>> so that the linkages with the rest of the database

What is stored in the drawing with the polyline (with globalwidhts) that fits to your final GIS-structure using UID's?

Either you have already ID's assigned to the polylines, then I don't see where these data is destroyed on the way it get's converted from line-topo to polygon-topo ... but maybe I'm missing something now.

 

Look to the video (done with 2010, so your 2011 can do that also) and let us know how this is useful (or not) for you.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 11 of 21
antoniovinci
in reply to: nomisc


nomisc wrote:

this is not a GIS issue, or rather it is, but one that cannot be fixed


Well, you're underestimating us and Map capabilities, so I give up right now, sir.
Alfy, he's all yours...

Message 12 of 21
nomisc
in reply to: nomisc

Hi Alfred,

That is precisely what I wanted to do and it seems to work, at least for some bits.Smiley Happy

I'm having problems that some of my features have intersects that the topology doesn't seem to like, but I've tried on simpler versions and it seems quite happy. I may have to do some more cleaning for those others, but I seem to be on the right track and actually creating polygons. As long as I can get it to work on the larger files and map sets I think this could be the solution. Thank you.

Message 13 of 21
Alfred.NESWADBA
in reply to: nomisc

Hi,

 

>> I'm having problems that some of my features have intersects that the topology doesn't seem to like

Upload a DWG with one or some of the polylines that make troubles so I can go "into them" and look what to do.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 14 of 21
nomisc
in reply to: Alfred.NESWADBA

Hi Alfred,

Try this. It's rather different to most of what you are used to dealing with I would think as it is all about archaeolgy. It was created some time ago without real thought for incorporation in GIS, hence the combination of open and closed lines etc. The fit and smoothing don't help either. What I'm after is a drawing with preferably nothing but closed polylines in it, but ones that represent the line widths etc currently expressed by the EWIDTH attribute. I hope that makes sense and I'm most grateful for your help. 

Message 15 of 21
Alfred.NESWADBA
in reply to: nomisc

Hi,

 

am I right that - while creating the buffer - you get the message that a value=0 is not ok for that operation?
If so it's the question what should happen with these polylines. And whatever should be done with them ==> select  them with command _QSELECT and make the changes you need (delete them, give them a minimal global-width, move them to a separate layer for a different handling).

 

For selecting out the closed polylines you also can use _QSELECT to get them selected, push them to another layer, freeze this layer and start then your polyline-width buffering. When this is done you can thaw the previous layer and you have only closed polylines.

 

If you get another message then please let me know the error you get and upload a drawing "with one or some" entities (few entities, not hundreds, so it's easier to identify the source of the problem).

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 16 of 21
antoniovinci
in reply to: nomisc

 
Message 17 of 21
nomisc
in reply to: antoniovinci

Hi there,

Thanks, that is just what I'm after.Smiley Very Happy

However, there appear to be some anomalies in that some features have been turned only into single polylines e.g. the blue sub-rectangular feature at c232300,61745 and some have not worked at all e.g. the green "no 7" just to the north at c232292,61827. Also some have been moved e.g. the set of lines at c232657,61949 where the created polygons have "bent" so that they no longer follow the original alignment. The difference is only 1m maximum so is within the tolerances of a +2.5m accuracy, but it is still slightly worrying.

 

The other thing is that I've just tried again with another file and even though I checked that all it had in in were polylines and 2Dpolylines and using QSelect I checked they had a Globalwidth <>0, when I ran the buffer I got an error saying "Zero offset. Can't build buffer". When I reduce the file by cutting it into chunks it works, but that defeats the object as I have 200+ files I need to process and so want to be able to use MapSets to minimise effort.

 

Anyway I hope that all made sense and thanks again for all your help.

Message 18 of 21
nomisc
in reply to: nomisc

Hi there,

 

Like I said that seems to answer my query, but I still don't understand why I get the "zero offset" error, when I am quite certain everything has a width. As I say, it is particularly puzzling as when I cut the file down it works, but as I said that somewhat defeats the object as I have 200+ files I'd like to deal with simultaneously using MapSets.

 

So if anyone has any ideas I'd be most grateful.

 

ThanksSmiley Happy

Message 19 of 21
nomisc
in reply to: nomisc

I attach an example file with only a small number of features for anyone to look at and see if they can get it to work and explain what I'm doing wrong. As you can see it has only polylines and 2D polylines, all of which have a width of 0.5 or 1, yet I still get an error telling me I have zero offset.Smiley Frustrated

 

Thanks again

Message 20 of 21
Alfred.NESWADBA
in reply to: nomisc

Hi,

 

for a short test: yes I could reproduce it with 2012, but I can't in 2013. So 2013 seems to better work with your data.

Why 2012 does not do what it should? :... I have no idea (currently).

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost