[postgis-users] Rhumb lines

David Bitner osgis.lists at gmail.com
Fri May 5 14:04:03 PDT 2006


Obviuosly, I don't really want to do my own work anymore on a friday
afternoon....

SQL function:
rhumb(pointgeom,pointgeom,integer)
takes start and end point and a minimum line segment length and
returns a rhumb line

CREATE FUNCTION rhumb( geometry,  geometry,  int8) RETURNS geometry AS
'select transform(segmentize(transform(makeline($1,$2),9804),$3),srid($1));'
LANGUAGE 'sql' VOLATILE;

I couldn't try it as evidently makeline doesn't exist in my old
install of PostGIS (man I need to upgrade).... hopefully it works :)

On 5/5/06, David Bitner <osgis.lists at gmail.com> wrote:
> I forgot to put in a distance for the segmentize, here it is with 100m:
> select transform(segmentize(transform(makeline(a,b),9804)),100),4326)
>



More information about the postgis-users mailing list