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

Jennifer Strahan jennifer at greeninfo.org
Tue Sep 23 13:17:00 PDT 2008


Yes, PHP.

Thanks,
Jennifer

Bruce Rindahl wrote:
> 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
>>
>>
>
> _______________________________________________
> 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