[postgis-users] Reference Grid

Paragon Corporation lr at pcorp.us
Sun Apr 19 20:58:38 PDT 2009


Bob,
 
Does the below help any.  The below will give you the centroid of the
portion of geometries that intersect a reference grid where the grid of the
reference is defined by reference.the_geom
 
SELECT r.gid, r.the_geom,
ST_Centroid(ST_Collect(ST_Intersection(r.the_geom,p.the_geom))) As
the_centroid
FROM tblpolygons As p INNER JOIN reference As r ON ST_Intersects(p.the_geom,
r.the_geom)
GROUP BY r.gid, r.the_geom
 
 
Hope that helps,
Regina

  _____  

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Bob
Pawley
Sent: Sunday, April 19, 2009 1:58 PM
To: PostGIS Users Discussion
Subject: [postgis-users] Reference Grid


Hi
 
I'm using a reference grid of small polygons.
 
I have been trying to collect concurrent polygons into one geometry in order
to establish the centroid of the region covered. I've tried a number of
operations such as union, contains, accum etc.
 
I haven't been successful.
 
Can anyone give me some ideas??
 
Bob
 
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20090419/1d2a71d5/attachment.html>


More information about the postgis-users mailing list