[postgis-devel] [PostGIS] #413: ST_OffsetCurve
PostGIS
trac at osgeo.org
Tue Mar 9 12:20:14 PST 2010
#413: ST_OffsetCurve
--------------------------+-------------------------------------------------
Reporter: rafalmag | Owner: strk
Type: enhancement | Status: assigned
Priority: medium | Milestone: PostGIS 2.0.0
Component: postgis | Version: 1.5.X
Resolution: | Keywords:
--------------------------+-------------------------------------------------
Comment (by rafalmag):
Ok. I produced a new patch ({{{postgis-offsetCurve-RafalMagda.patch}}}).
It applies to latest trunk.
arguments:[[BR]]
- geom[[BR]]
- distance (float) [[BR]]
- 'right' or 'left'[[BR]]
- (optional) parameters 'join=' and 'mitre_limit=' (like in St_Buffer
(without endcap) )[[BR]]
Example of use:
{{{
select ST_AsText(ST_OffsetCurve(
ST_GeomFromText('LINESTRING(10 10,10 20, 20 20 )'),
1,'right', 'join=mitre mitre_limit=5.0'));
--------------
LINESTRING(20 19,11 19,11 10)
select ST_AsText(ST_OffsetCurve(
ST_GeomFromText('LINESTRING(10 10,10 20, 20 20 )'),
1,'left', 'join=mitre mitre_limit=5.0'));
--------------
LINESTRING(9 10,9 21,20 21)
}}}
PS: Tested build with GEOS 3.2.0. Untested build with GEOS 3.1 - see code.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/413#comment:7>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list