Michaël Michaud wrote:

> Hi
 
>> One quick question: PostGIS and Spatialite ST_OffsetCurve function is 
>> turning the line
>> direction with right hand offset >ST_OffsetCurve(GEOMETRY,15,0)
>> Just read PostGIS documentation today (I'd better have read it before, but 
>> better late than never ;-)

 
>> This is not always a good behavior. User is perhaps willing to create 
>> parallel pipelines or 
>> roads and maintain the original line direction > both with  the left and 
>> right side offsets.
>> How does your plugin work by default with right side offset? If it is also 
>> turning the direction,
>>  how about having an option "maintain line direction"?

> What is good in PostGIS behaviour is that it is consistent. 
> Not sure I can assume anything about line orientation with my plugin.
> But you're right, orientation is an important point.
> IMHO, having the same orientation as the source or the opposite one is not
> so important as it is easy to reverse lines, (but it will be easy to add an 
> option
> if you have a use case, easier than making final orientation consistent with 
> the 
> initial orientation).

I learned this feature with a road network dataset which included also
addresses.  Data were all linestrings and addressed were placed in 
four attributes: start point left, start point right, end point left, and
end point right. I materialized the address points by doing left side and
right side offsets and then selecting the end and start points from 
the new lines.  It took a while to understand why the address numbers 
on the right side of the original road were all wrong.

Reversing the lines is not so difficult if you have a function for that, but 
after one has done the right side and left side offsets into the same
result layer then it is not easy at all to select only the lines which were 
born 
from right side offsets. Option for doing right side offset and reverse line 
together would help in practical work.

I can imagine that for the pipeline networks and oneway streets etc. it is 
rather 
valuable that offset result is consistent and if the result is unsure then users
should be warned. 

> Also, it would be good to compare postgis results and oj results for every
> non-trivial case.

My dataset was rather big and Spatialite did generate null geometries, 
self-intersections and multilinestrings into the offset layer.  I can try to 
repeat 
the test and capture the original geometries. Perhaps they are such
non-trivial cases.  Spatialite is using GEOS and it may be close to same code 
that is used in  PostGIS.

-Jukka-
 
> Thanks for your valuable input,

Michaël


 
-Jukka Rahkonen-
 
Michaël Michaud wrote:
 
Hi all,

Just added this plugin (should be available in next NB).

Firstly, I thought it was available in JTS, but the JTS OffsetCurveBuilder
produce a rough offset curve often containing self-intersection and needs 
to be post-processed to get something more usable.

Here is the process :
- compute rough offset curve (distance=d)
- node the result (with UnaryUnionOp)
- remove components located at a distance < d from the source
  (this is the tricky part as the computed offset curve itself may
   be slightly inside the distance - I estimated the error and took
   1 more percent to be sur no valid component are discarded,
   but it may still fails in some situations like using join mitre
   with a small limit or using a fixed precision model)
- merge the remaining linestrings

Here are some results


 



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/



_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to