[mapserver-users] KML Export

Josh Hevenor jhevenor at rogers.com
Wed Sep 2 13:18:16 EDT 2009


That approach worked perfectly! Thanks Steve,

Plus, if you access the layer in question through a service (wms
getfeatureinfo) then you have a makeshift (standards non-compliant?) 
KML web service.

I noticed on the template side that [shpclass] gives an index. Not a
problem, my style IDs are hard wired anyway. I was wondering what
mechanisms are available to use this index (what does it access) in the
template context?

Thanks again, this was a great help,

Josh

Steve Lime wrote:
> Josh, you can use MapServer templates to do this sort of thing. With this approach
> you can control most aspects of the output file because you have to write the
> basics. MapServer then adds feature specific things like geometries and attributes
> based on your template. You can run this nightly using a command line approach
> like so:
>
>   mapserv -nh "QUERY_STRING=map=your.map&mode=nsquery&qformat=mykml&layer=somelayer" > somelayer.kml
>
> The -nh surpresses the http headers so you can redirect your output to a file easily.
>
> This approach does not convert MapServer styling to KML, you'd need to make that
> part of your template. You can also build multi layer KML with this approach with one
> template used to represent multiple layers. Let me know if you need an example.
>
> Steve
>
>   
>>>> Josh Hevenor <jhevenor at rogers.com> 09/01/09 6:21 PM >>>
>>>>         
> I've been using the ogr2ogr kml exporter to build some nightly conversions
> of shape data. I'm wondering if there's a way to include symbolization
> here...something that accepts a mapfile and a layername (or just a
> mapfile, or whatever) and exports kml.
>
> Alternatively, I've used the ArcObjects 9.3 LayerToKML_converter and I have
> nicely symbolized features coming outbut no attributes.  
>
> Has anyone used open source tools and gotten both?  Any advice would be
> appreciated. If anyone has advice on an Arc approach they can contact me
> off-list.
>
> Thanks,
>
> Josh
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>   
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.5.409 / Virus Database: 270.13.74/2339 - Release Date: 09/01/09 06:52:00
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090902/d35fd9bb/attachment.html


More information about the mapserver-users mailing list