comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » IDL KML
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDL KML [message #67464 is a reply to message #67362] Tue, 21 July 2009 15:47 Go to previous message
mankoff is currently offline  mankoff
Messages: 131
Registered: March 2004
Senior Member
On Jul 14, 5:28 pm, mankoff <mank...@gmail.com> wrote:
> On Jul 12, 7:02 pm, mankoff <mank...@gmail.com> wrote:
>
>> There have been a few discussion of KML on this list (one herehttp://tr.im/s2dQ). I'm wondering if anyone has gone further with this
>> and has code willing to share. I've implemented five or six of the
>> elements shown in the diagram herehttp://code.google.com/apis/kml/documentation/kmlreferen ce.html
>> and thought I might not need to implement the entire schema if someone
>> else has already done so. If not, I'm pleased to share what I have...
>
>>   -k.
>
> Well this is my first major foray into IDL objects (not object
> graphics). Past posts on this group have been very helpful regarding
> private methods, singletons, object trees, etc.
>
> I now have about 1/5th of the top image herehttp://code.google.com/apis/kml/documentation/kmlreferen ce.html
> implemented in IDL objects. So far this means Folders and Placemarks.
> Next comes GroundOverlays and TimeSpans.
>
> Right now the following code works. It produces a KML file with 100
> pins distributed at random lat,lon coords, and random altitudes, with
> some of the pins floating and some extruded (a line down to the
> earth). If anyone might find this useful let me know.
>
> kml = obj_new('kdm_kml', file='test.kml')
> d = obj_new( 'kdm_kml_document', visibility=1 )
> f = obj_new( 'kdm_kml_folder', id='folder1', name='aFolder' )
> d->add, f
> for i = 0, 100 do begin
>   istr = STRING(i,FORMAT='(I03)')
>   p = obj_new('kdm_kml_placemark', $
>                id='Pid'+istr, $
>                latitude=randomn(seed,1)*90, $
>                longitude=randomu(seed,1)*360, $
>                x_altitudemode='relativeToGround', $
>                altitude=randomu(seed,1)*1e7, $
>                extrude=randomu(seed,1) gt 0.5, $
>                description='Some Text '+istr, $
>                name='Pid'+istr, $
>                visibility=1 )
>   f->add, p
> endfor
> kml->add, d
> kml->saveKML

I've put my code (for both KML and the rest of my IDL code library)
here: http://code.google.com/p/kdm-idl/

It is a work in progress (the KML part especially), but if anyone is
interested in the KML aspect or anything else feel free to browse and/
or download.

-k.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: stregex question
Next Topic: Re: stregex question

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 07:52:43 PDT 2025

Total time taken to generate the page: 0.95988 seconds