World Wind Forums

Go Back   World Wind Forums > WorldWind JAVA forums > Development Help

Development Help Help for building applications or diagnosing problems with WWJ

Reply
 
Thread Tools Display Modes
Old 01-29-2011, 08:49 AM   #1
BrunoSpy
Senior Member
 
Join Date: Aug 2009
Location: Paris
Posts: 232
BrunoSpy is on a distinguished road
Default Displaying a huge number of polylines

Hi,

I try to display a huge number of polylines, but I've a big performance issue : WWJ is nearly unusable...

I don't need to pick, rollover, hover or whatever.

For example, this is what I do, it works but so slooowwwlyy :



Do you have an idea ?
BrunoSpy is offline   Reply With Quote
Old 01-29-2011, 09:36 AM   #2
what_nick
Worldwind Developer
 
Join Date: Jan 2006
Location: Hobart, Australia
Posts: 754
what_nick is an unknown quantity at this point
Default

They look like airport approach/exit paths. You may be creating separate polyline Java objects. Will it be possible to push them all together into a display list ?

Cheers,

what_nick.
__________________
Coding This and That in World Wind and helping new people out, as long as they don't pester too much.
Currently blogging at: http://whatnicklife.blogspot.com
Working at:
Aerometrex - http://aerometrex.com.au/blog/
Impact so far:


what_nick is offline   Reply With Quote
Old 01-29-2011, 10:43 AM   #3
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,619
nlneilson is on a distinguished road
Default

Quote:
Originally Posted by what_nick View Post
You may be creating separate polyline Java objects. Will it be possible to push them all together into a display list ?
I would like to know what you mean by the "display list" also.

BrunoSpy: The number of red and the few blue lines seems like it should be manageable without too much of a performance hit.

A few thing which you have probably done but will mention.
Each track should be one polyline with many points rather than a bunch of polylines.
pathType = LINEAR;
.setNumSubsegments(1);
Do not call redraw() until they are all drawn.

If each new point has been added every second of the flight path then for a full day you may need to cull that to 10 sec or more at that view altitude and when zoomed in then each second but cull outside the view.

Are you getting the data from an ADS-B receiver?

Does France have charts in digital format similar to the U.S. FAA charts?
http://aeronav.faa.gov/index.asp?xml...v/applications
http://www.nlneilson.com/sectionals.html

Last edited by nlneilson; 01-29-2011 at 11:36 AM.
nlneilson is offline   Reply With Quote
Old 01-29-2011, 12:57 PM   #4
BrunoSpy
Senior Member
 
Join Date: Aug 2009
Location: Paris
Posts: 232
BrunoSpy is on a distinguished road
Default

Quote:
Originally Posted by nlneilson View Post
Does France have charts in digital format similar to the U.S. FAA charts?
http://aeronav.faa.gov/index.asp?xml...v/applications
http://www.nlneilson.com/sectionals.html
Most of aeronautic information is published in XML, but it's not available for people outside of DSNA (french air navigation service provider).
BrunoSpy is offline   Reply With Quote
Old 01-29-2011, 09:39 AM   #5
BrunoSpy
Senior Member
 
Join Date: Aug 2009
Location: Paris
Posts: 232
BrunoSpy is on a distinguished road
Default

Yes that is. Paris arrivals during two hours. But we need to display a whole day.

Your idea sounds interesting, can you explain it a bit more ?
BrunoSpy is offline   Reply With Quote
Old 01-29-2011, 12:51 PM   #6
BrunoSpy
Senior Member
 
Join Date: Aug 2009
Location: Paris
Posts: 232
BrunoSpy is on a distinguished road
Default

It's offline data, they are not updated once they are displayed.

We want to see the traffic of a whole day to study new airspace designs.

What you see on the screenshot is only 2 hours of traffic and it is already very slow to move the globe.

I have one polyline for each aircraft

I did not try pathType = LINEAR, but numSubSegments is already set to 1.
BrunoSpy is offline   Reply With Quote
Old 01-29-2011, 01:13 PM   #7
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,619
nlneilson is on a distinguished road
Default

I think pathType = LINEAR; is the default so unless you specify something like
pathType = GREAT_CIRCLE; there will be no extra CPU time for calculations.

"It's offline data, they are not updated once they are displayed."
I wasn't as clear as I should have.
Add only one point and skip the next 9. You will have only 1/10th the number points in each polyline at the eye distance you have. It could be the number of pixels your display has you will see no difference. Or at least a negligible difference and acceptable to get performance.
nlneilson is offline   Reply With Quote
Old 01-29-2011, 01:32 PM   #8
BrunoSpy
Senior Member
 
Join Date: Aug 2009
Location: Paris
Posts: 232
BrunoSpy is on a distinguished road
Default

Ok, I'm doing something like that (dropping points that are too close of the previous point).

But it only allows me to get 4 hours of traffic and keeping the app usable ...
BrunoSpy is offline   Reply With Quote
Old 01-29-2011, 01:44 PM   #9
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,619
nlneilson is on a distinguished road
Default

Also if points are less than a certain lat and lon from the center of the airport cull those.
Seems like seeing the runways rather than painting each pixel 50 times would a benefit.
Look at the Grid layers to see how Pat Murris did the culling.

I did a proof of concept to show every runway/airstrip in the CON U.S.. There are just under 20,000. I got the approx. latlonalt at LAX and several others then offset those to get about 25,000. First above a certain altitude they would not show. That list was then run through and if was within a certain latlon of the center of view it was drawn.
Performance was very acceptable in Java. I do all of that stuff with C++ now and feed it in with a socket. I basically just use WWJ as the display.
nlneilson is offline   Reply With Quote
Old 01-29-2011, 02:06 PM   #10
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,619
nlneilson is on a distinguished road
Default

Just try an if statement and drop all but every 5th, 10th, 20th or whatever to see where performance v a smooth track is acceptable.

You could also consider breaking it into one of every 20 tracks. Each loop would show 1/20th of all the tracks.
Even at a redraw of 50/sec it may acceptable rather than draw all the tracks every redraw.
nlneilson is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
WW1.3.2-Plugin: Layer Edit canosso Add-ons & Scripts 21 02-27-2010 04:37 AM
Broken Polylines maltaweel Development Help 4 06-07-2008 04:38 AM
GPS Tracker number of sites limitation? cilia Add-ons & Scripts 0 02-25-2008 01:18 PM
automatic number of edges on polyline tcmsimoes Development Help 1 07-16-2007 05:10 PM
convert lat/lon forms, SPC, Metes, make path Tom Moran Add-on & Script Development 21 03-06-2006 12:02 AM


All times are GMT +1. The time now is 04:46 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.