Convert line-shaped objects into real lines

Post questions on how to use or achieve an effect in Inkscape.
thany
Posts: 6
Joined: Tue Nov 20, 2012 6:45 am

Convert line-shaped objects into real lines

Postby thany » Tue Nov 20, 2012 6:55 am

So I've been using Inkscape for a while now, and I mainly use it to clean up some images. Currently, I am in the process of cleaning up a tourist map, which is fun cause you can see it getting cleaner, so to speak :)

Anyway, here's the thing. There's a bunch of line-shaped objects (roads) that I want to convert to real lines somehow, so I can more easily adjust the style and thickness. It's easier to maintain, is what I'm saying. The lines are actually shapes that look like lines, and have a solid fill and no stroke. I want to convert them into real lines with no fill and only a stroke.

I tried to fiddle with putting angled guides right in the center of each straight road section, but that'll produce nothing but a maze of guides for a fair-sized road. Plus it's really fiddly trying to get the guides smack in the middle of each segment, because there's nothing for them to "snap" to.

So I realize this would be hard if there are non-uniform shapes (like T-shaped lines) and there are, but I can probably break them apart if that suddenly makes my goal achievable.

Does anyone know an easy but accurate way of doing this? Thanks.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Convert line-shaped objects into real lines

Postby brynn » Tue Nov 20, 2012 12:27 pm

Image
Welcome to InkscapeForum!

You mean that the roads are all straight, and that they are all long and really skinny rectangles? I don't understand the process you described, using guides....but you may still have to continue using it. I don't think it's possible to convert such a shape into a line or path. If the "lines" are all straight, it probably wouldn't be very hard to use the Pen/Bezier or Pencil/Freehand tool, to draw new paths though.

What you described with the guides, do you mean that you try to put the guide at the same angle as the rectangle/line, so that it's centered along the length of the rectangle/line? You could snap to the center of the object to have it centered. Maybe that will make it easier?

User avatar
flamingolady
Posts: 687
Joined: Wed Jun 10, 2009 1:40 pm

Re: Convert line-shaped objects into real lines

Postby flamingolady » Wed Nov 21, 2012 1:28 am

It's hard to image what you mean, without seeing it, however, the only thing I can possibly think of would be to convert the line to a path (Path then Stroke to Path), that might allow you more flexibility, you can at least adjust both sides of the 'road'.

thany
Posts: 6
Joined: Tue Nov 20, 2012 6:45 am

Re: Convert line-shaped objects into real lines

Postby thany » Thu Nov 22, 2012 9:13 pm

It's a little hard to explain, possibily in part because I'm not quite familiar with Inkscape's terminology.

I guess you could imagine a shape's stroke being converted to a shape, and now I need to convert it back. So to speak.
The roads in my case are not rectangles, unfortunately. They are contuous roads with bends and sharp corners, all in one polygon. Sometimes there are T, Y and X shaped intersection, but those I can easily break apart if neccesary. Luckily, there are no curved roads.
When I try to convert it's stroke to a line and use only the one "side", I end up with an offset that cannot be matched up with the background and POI's (and the original road). Because of the curves and corners.

I'll try to make a minimal example sometime today, since the file I'm working with currently is not very suitable to serve as an example.

thany
Posts: 6
Joined: Tue Nov 20, 2012 6:45 am

Re: Convert line-shaped objects into real lines

Postby thany » Fri Nov 23, 2012 10:49 am

Attached an example of the line-shaped objects (roads) that I would like to convert into actual lines. I'm sorry it took a while to produce this example.
Attachments
drawing.svgz
(39.62 KiB) Downloaded 204 times

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Convert line-shaped objects into real lines

Postby brynn » Fri Nov 23, 2012 11:37 am

Ok, I understand what you mean now. But the answer is the same. They can't be converted to a simple path. Probably the best way to solve this problem, is to draw new lines over top of them. Sorry, I wish I could be more helpful.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Convert line-shaped objects into real lines

Postby brynn » Fri Nov 23, 2012 12:39 pm

Off topic:
PT, regarding your signature, I thought you might be interested in this: viewtopic.php?f=9&t=12764

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: Convert line-shaped objects into real lines

Postby hulf2012 » Sat Nov 24, 2012 12:52 pm

Hello

I always watch this forum.

I see that the problem of the participant it's very similar to the topic reviewed here:

Special Image Tracing!
http://www.inkscapeforum.com/viewtopic.php?f=5&t=5558&p=23843&hilit=wintopo#p23843


Also, i tried the methods given in the linked topic above. So yes, it can be done, not in Inkscape, but it can be done. However, according to my experiments, the transformation is not perfect. There are problems when a line cross other. At the end, hand editing is needed.

Sorry for my bad English

Un saludo

User avatar
flamingolady
Posts: 687
Joined: Wed Jun 10, 2009 1:40 pm

Re: Convert line-shaped objects into real lines

Postby flamingolady » Sun Nov 25, 2012 8:05 am

Glad you posted an example, not at all what I was expecting. I'm wondering if you could group the similar roads together, then use the Path Editor to bend them all at once, not sure how that would work though.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Convert line-shaped objects into real lines

Postby brynn » Sun Nov 25, 2012 9:31 am

Welcome hulf2012 :D

I guess you are talking about a centerline trace? I suppose that could be an option. But like you said, it doesn't perform well where lines intersect. You'd still be in for a bunch of secondary editing. I've tried it too. I'm not familiar with Wintopo, but I've use the centerline trace here: http://www.roitsystems.com/cgi-bin/autotrace/tracer.pl

thany
Posts: 6
Joined: Tue Nov 20, 2012 6:45 am

Re: Convert line-shaped objects into real lines

Postby thany » Mon Nov 26, 2012 10:18 pm

The "Special Image Tracing!" topic looks promising. If I understand correctly, it refers to exactly what I need.

I don't mind doing a little handwork prior to the step, and a little straighting afterwards. If there's something that performs the bulk of the works, that would be most helpful.


Return to “Help with using Inkscape”