![]() |
|
|||||||
| Feature Discussion Education, discussion and proposals of WWJ features |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: May 2007
Posts: 39
|
Ok, I've been having a little fun building a quick-and-dirty KML Layer. I've seen other mentions of this around here, I'm not sure if anyone else is doing the same thing. I thought I'd share a few screen caps and my experiences.
First is a KML file of the Appalachian Trail. The file has about 30 LineStrings with a total of a couple hundred thousand points. At first, I tried to render all the points, but it was too slow. So I've changed my code to simplify the LineString for the current view. With that, I get plenty of FPS and, if you zoom in, you still see all the detail you need. Here's a cap of the whole trail: http://homepage.mac.com/timgleason/.Pictures/AT1.png And one of the end: http://homepage.mac.com/timgleason/.Pictures/AT2.png Next are some caps of a KML file with 3d models(*) of Vancouver's buildings. Some of the things in this file I don't render. Most I don't render correctly. Worse, I'm so far unable to optimize it enough that the framerate is even reasonable. The KML file is big, but I think I should be able to render faster -- I need to figure out how to cache the right data. Right now, with this model, I get about 2FPS (yikes). All the same, I think it looks promising. Here's the whole city: http://homepage.mac.com/timgleason/....Vancouver3.png Here's a zoom in: http://homepage.mac.com/timgleason/....Vancouver2.png And this is from the coast: http://homepage.mac.com/timgleason/....Vancouver1.png The bad news is that I'm new to OpenGL, so a lot of what I've written probably sucks pretty bad. Once I get a little further along, I'll add some comments. I'll post the code if anyone is interested. Maybe someone can improve some of my rendering code. --t * The 3d Models in this file are not really models. They are just extruded polygons. |
|
|
|
|
|
#2 |
|
Member
Join Date: Jun 2007
Posts: 30
|
Tim,
Nice work, I am planning to work on kml next ... did you use the kml posting from Chris Maxwell's posting to read the kml? Shin Last edited by shin103; 09-06-2008 at 04:22 PM. |
|
|
|
|
|
#3 |
|
Member
Join Date: May 2007
Posts: 39
|
I wrote my own parser. It's pretty simple. Right now it only parses what I might want to draw.
I did some work this weekend and things are getting better. I implemented proper shading for the polygons -- they look pretty nice. And I improved the performance enough that you can scroll around that full city pretty quickly. I didn't measure the framerate, but it was pretty reasonable. I also added a tree view so you can select an item from the file and pan to it. I'll be away this week, but I think I'll post the code shortly after I get back in case anyone wants to play with it... --t |
|
|
|
|
|
#4 |
|
WWJ Consultant
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
|
Nice work Tim! Any more progress on kml since then?
|
|
|
|
|
|
#5 |
|
Member
Join Date: May 2007
Posts: 39
|
Ok, looks like I had less time than I thought I might
![]() Since I promised something, I have uploaded what I have. I does a subset of KML - polygons (extruded and with holes), lines (tessellated) and points as pushpins (right now it ignores point styles). It is reasonably performant -- but could always use work. It has a simple example viewer that loads three sample KML files (that are zipped with it -- you must run from the unzip dir). The viewer includes a tree pane. You can double-click on a leaf node in the tree and the globe will pan zoom to that point (more or less, zoom is just a guess). I put a readme file in there that gives a short overview of the code. I also put some comments in the main class (KMLLayer) that should help to understand it. Try it out and let me know how it does. I really only tried to get it to work with a handful of test files. If you have a file that you want it to be able to display but it doesn't, post a link. If I have free time, I will try to make it go. (Ditto for files that display poorly or slowly). The code with the samples is here: http://idisk.mac.com/timgleason-Public/kmllayer-0.1.zip Let me know if you have any questions... Thanks, tim |
|
|
|
|
|
#6 |
|
Member
Join Date: May 2007
Posts: 34
|
That feature included in the next release would make a nice (early?) Christmas present .
Together with an example to start/feed the WWJ applet with an KML/KMZ file, I already know two sites where I would integrate the WWJ applet ASAP. Klaus |
|
|
|
|
|
#7 |
|
WWJ aficionado
Join Date: Aug 2007
Posts: 134
|
Hi, a bit later but I have some KML code.
It was created using KML2.2 and JAXB. I haven't made depthly test but waht I'm tested works fine. I have a couple of links in my blog and if any is interested I can publush the code without problems. Bye.
__________________
|--------------------------------------- | http://acuriousanimal.orggeo.net |--------------------------------------- | http://acuriousanimal.blogspot.com | http://theballoonproject.blogspot.com |--------------------------------------- | _ __ | /_| ( _ _/'_ _ |( |. __)(//)//(/(/() | _/ |--------------------------------------- |
|
|
|
|
|
#8 |
|
God. Root. What is difference?
Join Date: Sep 2004
Location: Eastern Pennsylvania
Posts: 2,856
|
Think we have like 3 different attempts at KML so far.. be nice if we can merge them into 1 and get a complete KML support going so what you see in GE, is what you see in WWJava.
__________________
![]() Earth is Square blog PUBLIC NOTICE AS REQUIRED BY LAW: Any use of this forum post, in any manner whatsoever, will increase the amount of disorder in the universe. Although no liability is implied herein, the consumer is warned that this process will ultimately lead to the heat death of the universe. |
|
|
|
|
|
#9 |
|
Junior Member
Join Date: Aug 2008
Posts: 7
|
Hi Tim G
I downloaded the kmllayer-0.1.zip ,and unzip it,but the folders images and models are null. there is a line (import worldwind.kml.KML3dLayer in file SimpleClient.java ,i can't find the class worldwind.kml.KML3dLayer.what happened? thank you |
|
|
|
|
|
#10 |
|
Member
Join Date: May 2007
Posts: 39
|
I'm not sure what you meant in the first part of your comment. But KML3dLayer was just an old version I deleted. Just delete the import line and you should be fine.
--t |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Plugin: My favorite Icons - Add Icons/Favorite | canosso | Add-ons & Scripts | 26 | 03-02-2010 04:06 AM |
| WW1.3.2-Plugin: Layer Edit | canosso | Add-ons & Scripts | 21 | 02-27-2010 05:37 AM |
| WWJ Kml basic implementation v1.0 | cmaxwell | Development Help | 20 | 12-09-2009 08:55 AM |
| Layer Priority | WWG | Add-on & Script Development | 3 | 12-08-2005 02:01 PM |
| GPX to Track and Layer, Waypoints to Layer | canosso | Add-ons & Scripts | 14 | 03-05-2005 07:37 PM |