<html style="direction: ltr;">
<head>
<meta content="text/html; charset=windows-1255"
http-equiv="Content-Type">
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body style="direction: ltr;"
bidimailui-detected-decoding-type="preferred-charset" text="#660000"
bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Sorry, I misunderstood the problem
altogether. <br>
What you're looking for a a solution to the "centerline" problem.
Given two river banks, how to find the river centerline. It's not
a trivial problem. Here's some discussions:<br>
<br>
<a class="moz-txt-link-freetext" href="http://osgeo-org.1560.n6.nabble.com/Centerlines-of-Polygons-skeletons-td3924764.html">http://osgeo-org.1560.n6.nabble.com/Centerlines-of-Polygons-skeletons-td3924764.html</a><br>
<a class="moz-txt-link-freetext" href="http://smathermather.wordpress.com/2012/08/10/what-is-the-center-line-of-a-complex-polygon-routing-stream-and-rivers-part-two/">http://smathermather.wordpress.com/2012/08/10/what-is-the-center-line-of-a-complex-polygon-routing-stream-and-rivers-part-two/</a><br>
<br>
One of the "simple" ways to do it requires working with rasters,
then converting back to a vector. You would have to:<br>
1- Create a closed polygon of the two line features by connecting
the ends.<br>
2- convert the polygon to a GRASS raster<br>
3- Using GRASS, there is a module "r.thin" which shrinks a polygon
until it is only one pixel wide.<br>
4- Convert back to a vector, and export to a shapefile.<br>
<br>
If I get some time, I'll look into this a bit more. <br>
Regards,<br>
Micha<br>
<br>
On 13/01/2013 00:37, Lester Anderson wrote:<br>
</div>
<blockquote
cite="mid:CAE3taFA+-VVeQQ9ghd7xwvYpx=EJEJP2PgzQVHjLu4wntcK84A@mail.gmail.com"
type="cite">Hi Micha,<br>
<br>
Hit button too quick!<br>
<br>
I was not able to get your script to work, but maybe I did not
understand the way the spatialite layer works. It looks like the
script generates the vector lines: what I need is a way to use a
couple polylines in a layer that are selected and generate a mean
line between the two (attached image). So in essence is there a
simpe way to compute the mean distance between two polylines and
interpolate the a new median polyline?<br>
<br>
From the way your script looks,it should be possible, but it looks
somewhat convoluted.<br>
<br>
I have tried to make a worflow to explain:<br>
<br>
1. Load up shapefle containing polylines<br>
2. Select two lines to compute<br>
3. Compute the median distance between lines 1 and 2<br>
4. Export result as a new shapefile<br>
<br>
Hope this helps<br>
<br>
Cheers<br>
<br>
Lester<br>
<br>
<br>
<div class="gmail_quote">On 12 January 2013 22:34, Lester Anderson
<span dir="ltr"><<a moz-do-not-send="true"
href="mailto:arctica1963@gmail.com" target="_blank">arctica1963@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":u0">Hi Micha,<br>
<br>
I was not able to get your script to work, but maybe I did
not understand the way the spatialite layer works. It looks
like the script generates the vector lines: what I need is a
way to use a couple polylines in a layer that are selected
and generate a mean line between the two (attached image).
So in essence is there a simpe way to compute the mean
distance between two polylines and interpolate the a new
median polyline?<br>
<br>
From the way your script looks,it should be possible, but it
looks somewhat convoluted.<br>
<br>
I have tried to make a worflow to explain:<br>
<br>
1. Load up shapefle containing polylines<br>
2. Select two lines to compute</div>
</blockquote>
</div>
<br>
<br>
<br>
This mail was received via Mail-SeCure System.<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Micha Silver
GIS Consulting
052-3665918
<a class="moz-txt-link-freetext" href="http://www.surfaces.co.il">http://www.surfaces.co.il</a>
</pre>
</body>
</html>