[postgis-users] help with sql - calc area of polygons within map view

Bruce Rindahl rindahl at lrcwe.com
Tue Sep 23 13:06:20 PDT 2008


How are you connecting with the database? PHP?
Bruce

Jennifer Strahan wrote:
> Hi Everyone,
>
> I'm hoping someone can offer guidance on writing an sql statement.
> I'm working on a Google maps interface to display protected lands in 
> California.  As the user moves the map, I'd like to calculate the 
> total area of protected lands within the current map view.  I'm able 
> to get the map bounds as lat/lon and pass that to the script.  I'm not 
> sure how to do processing though.  Do I need to use ST_Union to get 
> the union of the map frame and the polygons, then get the area of 
> that?  Any examples on how to write the SQL would be very helpful.  By 
> the way I have multiple geometry columns in my table, one that is CA 
> teale albers (the_geom_ca_albers), and one that is web mercator 
> (the_geom_google).
>
> Thanks,
> Jennifer
> _______________________________________________
> 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