[postgis-users] Great circle as a linestring

Colin Wetherbee cww at denterprises.org
Fri Feb 22 11:17:37 PST 2008


Colin Wetherbee wrote:
> Transform(
>   Segmentize(
>     MakeLine(
>       Transform(dp.location, 53027),
>       Transform(ap.location, 53027)
>     ), 4000
>   ), 4326
> ) AS line
> 
> The 4000 is an arbitrary "distance" I conjured up.  I don't really know 
> what the units are, but 20 was too low and thrashed my server for a few 
> minutes before I killed the process.

For archival purposes...

I've found 96000 to be a good number for the distance.  It's big enough 
to require relatively little computation in the database and small 
enough to not cause broken lines.  128000 creates big gaps in the lines.

I still have no idea what the units are. :)

Colin



More information about the postgis-users mailing list