[postgis-users] Write out KML for each database record?

Dane Blakely Springmeyer blake at hailmail.net
Wed Oct 24 17:46:12 PDT 2007


Jason,
Thanks for the great suggestions. I'm two weeks old with PostGis at  
this point, so yes, its very exciting to know how much is possible.

When you emailed I was just learning about MIME-Types and had just  
finished also making a auto-generated link to view those same kml's  
in google maps like you tried. The page now reflects that idea  
(http://dev.riverchange.org/postgis2KMLtable.html).

Cheers,

Dane



On Oct 24, 2007, at 4:52 PM, Jason Birch wrote:

> Hi Dane,
>
> That's pretty cool stuff.  You can even paste your KML right into  
> Google Maps and display it in 2D fairly easily.  You can create  
> links to this from your page with a simple:
>
> http://maps.google.com/?q=http://dev.riverchange.org/kml/457.kml   
> (for instance)
>
> There are lots of cool things you could do with PostGIS on the back  
> end, like set up a network link to a PHP script that does a bounds  
> request and returns all of the features from within those bounds  
> when the width/height are within a certain tolerance.  This works  
> well-enough in Google Earth and also in Maps.  For better  
> performance in Google Earth, you could create a "master" kml file,  
> which has network links to each of the polygons with Regions  
> associated with them so that they are only fetched when in close- 
> proximity.  If you returned the bounding coordinates for each  
> geometry in your query, you could actually be generating this at  
> the same time as you are generating your individual files, building  
> it up one-link for each iteration through the record set.
>
> Couple things:
>
> - doesn't look like names are showing up correctly yet...
>
> - your server doesn't appear to be configured with the correct MIME- 
> type for KML files.  Without this in place, many browsers (OK, well  
> at least IE) will just display the XML
>
> Jason
>
> ________________________________
>
> From: Dane Blakely Springmeyer
> Subject: Re: [postgis-users] Write out KML for each database record?
>
> I've now written a SQL query that creates a relative http link within
> respective database rows that points to those kml files.
>
> <winmail.dat>
> _______________________________________________
> 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