[postgis-users] create 10m buffer using input data in EPSG4326
Luis Carrasco
leca00 at gmail.com
Wed May 22 13:33:50 PDT 2013
Hi Karsten,
One way could be using st_transform inside your query and assign a new
sridin meters during
the selection process, but it depends on whether there's a single
projection in meters you could use for all your unprojected dataset.
Transforming 10m to degrees would be the other solution, but it will differ
by angle, so you may have to use a function. On the other hand, if you are
running calculations on the geometry, it's probably recommendable to
project data first. My 2 cents
SELECT 10 AS score, ST_Difference(
ST_Union(ST_Buffer(st_transform(roads.the_geom, srid_in_meters), 10)),
ST_Union(ST_Buffer(st_transform(roads.the_geom, srid_in_meters), 0))
)
AS the_geom
FROM geodata.roads2012_ca roads
GROUP BY score
On Wed, May 22, 2013 at 4:18 PM, karsten <karsten at terragis.net> wrote:
> **
> Greetings, I am working on creating 10m buffers around roads:
>
> SELECT 10 AS score, ST_Difference(
> ST_Union(ST_Buffer(roads.the_geom, 10)),
> ST_Union(ST_Buffer(roads.the_geom, 0))
> )
> AS the_geom
> FROM geodata.roads2012_ca roads
> GROUP BY score
>
> So far I have the roads in dd (EPSG 4326) and was wondering how I could
> pass the distances in meters into the buffer function (without necessarily
> creating a new column with projected geometries). I guess could use some
> geography data type function .. but how ?
>
> Thanks
> Karsten
>
> Karsten Vennemann
> Principal
>
> Terra GIS LTD
> 2119 Boyer Ave E
> Seattle, WA 98112
> USA
> www.terragis.net******
>
> Phone ++1 206 905 1711
> Fax ++1 925 905 1711****
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
>
--
Luis Eduardo Carrasco, Ph.D.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130522/8d271558/attachment.html>
More information about the postgis-users
mailing list