[postgis-users] Buffer/Nautical Miles

pcreso at pcreso.com pcreso at pcreso.com
Thu Sep 11 14:45:38 PDT 2008


Hi Blake,

I have done this sort of thing pretty often... I find PostGIS makes it pretty easy.

My approach is to generate an arbitrary equal area projection which reasonably robustly covers the area of interest. (Let me know if you need a hand with this)

The buffering query then transforms the lat/long point into this coordinate system to generate the buffer, then transforms the result back to lat/long.
This does generate "circles" which are not round in a lat long "projection".

eg: (assume your new equal area projection is SRID:100000 in a geometry column called circle & your lat/long data is SRID:4326 called point & the buffer distance is $NM)

update <table> set circle=transform(buffer(transform(point,10000),1852*$NM),4326);

This uses your new projection to generate the correct buffer, but all input is lat/long as is the output....

Of course you can add another parameter to buffer to set the number of points you want to define the circle.

HTH,

   Brent Wood



--- On Fri, 9/12/08, Blake Crosby <me at blakecrosby.com> wrote:

> From: Blake Crosby <me at blakecrosby.com>
> Subject: [postgis-users] Buffer/Nautical Miles
> To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
> Date: Friday, September 12, 2008, 8:36 AM
> I'm trying to create "circles" by using the
> buffer function around a point.
> 
> The radius values i'm working with are in nautical
> miles. The definition 
> of a nautical mile is 1 minute of 1 degree.
> 
> Since this unit of measurement is based on a degree, and
> WSG84 is based 
> on degrees of lat/long (and not meters like UTM) will the
> following be 
> valid for a circle with a radius of 2 nautical miles around
> point 
> (72.3,-45.3)?
> 
> st_buffer(st_geomfromtext('POINT(-45.3 72.3)',
> 4326), 0.0166667*2)
> 
> I'm trying to troubleshoot a problem I'm having and
> want to rule out any 
> issues with my usage of buffer.
> 
> Blake
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list