[postgis-users] Google Earth/PostGIS integration

Brian Timoney brian at thetimoneygroup.com
Tue May 23 10:07:15 PDT 2006




Jim:

With time a little short these days, I'll simply sketch out a few key points--

1)  The viewbox parameters for Google Earth (bbox, tilt, heading, range, etc.)
can be read by a server script (PHP, ASP, CFM, etc.) via a Network Links layer
in GE.

2)  Now that you have a handle on where the viewer is looking, how far they're
zoomed in, etc., you can craft SQL queries to do perform geoprocessing
operations (e.g. clipping), etc.  Again, using server-side scripting, you can
then query your PostGIS db on the back-end.

3)  The Geometry specifications for Googles KML (Keyhole Markup Language) are
very similar to the OGC's GML standard.  So pulling geometry out of PostGIS
using the 'AsGML(the_geom)' function gets you 90% home in terms of converting
query responses back into KML.

4)  Applying the appropriate MIME types to the KML you send out from the server
will ensure that the receiving browser knows to shuttle the response to the GE
interface.

5)  Using GE's internal web browser (Windows only), is a handy way of keeping
the user in the general "environment" even though technically the bulk of the
data transaction is taking place between web browser and server.


Hope this is helpful,


Brian












-----------------------
The Timoney Group
518 17th Street
Suite 430
Denver, CO  80206

Ph:  (303) 929-3722
Fax: (303) 571-4304

www.thetimoneygroup.com
-----------------------











-----------------------
The Timoney Group
518 17th Street
Suite 430
Denver, CO  80206

Ph:  (303) 929-3722
Fax: (303) 571-4304

www.thetimoneygroup.com
-----------------------




More information about the postgis-users mailing list