World Wind Forums

Go Back   World Wind Forums > Community > WorldWind General

WorldWind General General WorldWind discussions.
Note: This is not a technical support forum. It is for World Wind topics that don't fit into other categories.

Reply
 
Thread Tools Display Modes
Old 07-18-2006, 12:21 AM   #1
James_In_Utah
Super Member
 
James_In_Utah's Avatar
 
Join Date: Jan 2006
Location: Eden, Utah
Posts: 1,779
James_In_Utah
Default Changing colors of ESRI shapes???

Hi,
I display ESRI shape files on WW, and now my users want to be able to change the colors of the shapes by changing cell values in an external excel spreadsheet. Can anyone layout a plan on how to do this for me? What mechanisms does WW have available to look into an excel spreadsheet? This would be done during a status briefing, so the user would want to update the cell, go over to WW, refresh the view, and see the new color. Any help on this would be greatly appreciated.
Thanks,
James

Last edited by James_In_Utah; 07-18-2006 at 12:43 AM.
James_In_Utah is offline   Reply With Quote
Old 07-18-2006, 12:41 AM   #2
withak
What?
 
withak's Avatar
 
Join Date: Apr 2005
Location: San Francisco, California
Posts: 2,461
withak
Default

Write a macro that writes an xml file with the updated color.

You can't just refresh the view in WW either, you have to restart or reload Earth from the file menu for the changed xml to take effect.
withak is offline   Reply With Quote
Old 07-18-2006, 12:47 AM   #3
James_In_Utah
Super Member
 
James_In_Utah's Avatar
 
Join Date: Jan 2006
Location: Eden, Utah
Posts: 1,779
James_In_Utah
Default

Would turning off the Shapes from the Layer Manager and turning it back on do the same thing? These are managers and non-techs doing the briefings, so I need to make this realitively seemless. Exporting the XML should be an easy macro to do, but how do I get WW to use this XML for the colors of the shapes? Also, can I go into the code and add the functionality to read the XML and redisplay the correct colors to the F5 function in the main app? Would I be better off writing a pluggin to do this? Thanks, for the suggestion....
James
James_In_Utah is offline   Reply With Quote
Old 07-18-2006, 02:47 AM   #4
withak
What?
 
withak's Avatar
 
Join Date: Apr 2005
Location: San Francisco, California
Posts: 2,461
withak
Default

If you want seamless then WW isn't for you.

The xml from the macro would replace the xml file for the shapefile layer in the WW directory, but with different numbers in the appropriate places.

I don't know how to change the reload behavior; add an issue on the bug tracker.

Is the color that big of a deal? Just make your best guess about what color they will like and tell them changing it isn't an option.
withak is offline   Reply With Quote
Old 07-18-2006, 03:17 AM   #5
James_In_Utah
Super Member
 
James_In_Utah's Avatar
 
Join Date: Jan 2006
Location: Eden, Utah
Posts: 1,779
James_In_Utah
Default

Color is the big deal. Green means good, yellow means not so good, and red means really bad. They would like to do some what if this was green and that was red and this is what happens when they all go red type stuff.
James_In_Utah is offline   Reply With Quote
Old 07-18-2006, 03:26 AM   #6
withak
What?
 
withak's Avatar
 
Join Date: Apr 2005
Location: San Francisco, California
Posts: 2,461
withak
Default

This will be very slow for that.

Shapefiles get turned into image layers too, so changing colors on the fly via a plugin would be hard to do as well.
withak is offline   Reply With Quote
Old 07-18-2006, 03:43 AM   #7
James_In_Utah
Super Member
 
James_In_Utah's Avatar
 
Join Date: Jan 2006
Location: Eden, Utah
Posts: 1,779
James_In_Utah
Default

It takes about 30 seconds on my laptop to load up all of the shapes, with a default color of yellow. Before the presentation the colors would be set to the current actual values. During the brief, someone may want to see what the situation would be if one ore two, or a small group changed states. It shouldn't take that long to turn one off, change the color, and then turn it back on, even if it means reloading the whole shape with a different color. At least I hope that's the case.
Thanks,
James
James_In_Utah is offline   Reply With Quote
Old 07-18-2006, 11:47 AM   #8
what_nick
Worldwind Developer
 
Join Date: Jan 2006
Location: Hobart, Australia
Posts: 754
what_nick is an unknown quantity at this point
Default

Hey James ok i suggest you fake it.Make separate Shape XML's with different colours and put them as view only one true and switch between them.
Like talk and say if this changes layer2 is waht it will look like and so on ...
We are working on supporting different KML colours and periodically refreshing shapefiles but we are not there yet. Do you think your executives can hire us a developer/pay you to learn some C#.
[Dumb plug - pay apogee to develop some coloring functionality]
what_nick is offline   Reply With Quote
Old 07-18-2006, 12:01 PM   #9
James_In_Utah
Super Member
 
James_In_Utah's Avatar
 
Join Date: Jan 2006
Location: Eden, Utah
Posts: 1,779
James_In_Utah
Default

Thanks for the suggestion. All of my shapes add up to about 20MB, so if I represent all of them with Red, Green, and Yellow, I'm only talking about 60MB. Then it is only a matter of manipulating the XML file. I've got enough C++ and C# experience to be able to handle that I think. I'll be sure to let you know how this works out!
Thanks,
James
James_In_Utah is offline   Reply With Quote
Old 07-18-2006, 12:24 PM   #10
what_nick
Worldwind Developer
 
Join Date: Jan 2006
Location: Hobart, Australia
Posts: 754
what_nick is an unknown quantity at this point
Default

Hi james u dont have to triplicate the data .. just change the styling in the XML.
what_nick 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
3D ESRI Shapes? James_In_Utah WorldWind General 1 02-04-2006 11:06 PM


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


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