nasa-exp-checkins Mailing List for NASA WorldWind
Brought to you by:
baker99-bull,
vigilant
You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(160) |
Jun
(302) |
Jul
(417) |
Aug
(96) |
Sep
(42) |
Oct
(135) |
Nov
(223) |
Dec
(22) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(36) |
Feb
(29) |
Mar
(70) |
Apr
(94) |
May
(96) |
Jun
(57) |
Jul
(97) |
Aug
(178) |
Sep
(235) |
Oct
(225) |
Nov
(47) |
Dec
(57) |
| 2007 |
Jan
(111) |
Feb
(41) |
Mar
(66) |
Apr
(38) |
May
(51) |
Jun
(7) |
Jul
(49) |
Aug
(6) |
Sep
(33) |
Oct
(17) |
Nov
(10) |
Dec
(15) |
| 2008 |
Jan
(16) |
Feb
(8) |
Mar
(11) |
Apr
|
May
(1) |
Jun
(10) |
Jul
(17) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2009 |
Jan
(2) |
Feb
(23) |
Mar
(12) |
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(7) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(3) |
| 2010 |
Jan
|
Feb
(1) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(6) |
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Twitter <con...@tw...> - 2014-05-31 17:42:39
|
مازال massad ينتظر انضمامك إلى تويتر...
يُساعدك تويتر على البقاء مُتصلًا بما يحدث الآن مع الأشخاص والمنظّمات التي تهمّك.
قبول الدعوة
https://twitter.com/i/549bfe03-7600-4fb6-8506-fe4ec95926fa
--
You can unsubscribe from receiving email notifications from Twitter at anytime. For general inquiries, please visit us at Twitter Support.
إلغاء الاشتراك: https://twitter.com/i/o?t=1&iid=167a1c6239054e1e928c5fccf295771f&uid=0&c=vWDsZby8OGYnYLTbO8mO%2BWIoQyEMsfIYWIq12WIqoqf0Fu3Loshr5A%3D%3D&nid=156+26+20140530
هل تحتاج مساعدة؟
https://support.twitter.com |
|
From: massad (ع. ت. <con...@tw...> - 2014-05-27 21:03:52
|
قام massad بإرسال دعوة لك
يُساعدك تويتر على البقاء مُتصلًا بما يحدث الآن مع الأشخاص والمنظّمات التي تهمّك.
قبول الدعوة
https://twitter.com/i/549bfe03-7600-4fb6-8506-fe4ec95926fa
--
You can unsubscribe from receiving email notifications from Twitter at anytime. For general inquiries, please visit us at Twitter Support.
إلغاء الاشتراك: https://twitter.com/i/o?t=1&iid=61dab479ef384b91ad2392d9f37d19ce&uid=0&c=vWDsZby8OGYnYLTbO8mO%2BWIoQyEMsfIYWIq12WIqoqf0Fu3Loshr5A%3D%3D&nid=9+26
هل تحتاج مساعدة؟
https://support.twitter.com |
|
From: Saleh M. <no-...@sk...> - 2012-10-29 01:58:30
|
<http://skillpages.com/s/HHIZZCFsEeKPYtU_/A7bXXQ2> Hi! Unlock new opportunities for you and your contacts. <http://skillpages.com/s/HHIZYCFsEeKPYtU_/A7bXXQ2> Saleh Massad Invite sent: 15 October, 2012 Join me on SkillPages <http://skillpages.com/s/HHIZXyFsEeKPYtU_/A7bXXQ2> nas...@li... was invited to join SkillPages by Saleh Massad. If you don't want to receive these emails from SkillPages in the future, you can unsubscribe <http://skillpages.com/s/HHIZYyFsEeKPYtU_/A7bXXQ2> . © 2012 SkillPages, Blackrock Business Park, Dublin, Ireland and 228 Hamilton Avenue, 3rd Floor, Palo Alto, CA 94301 |
|
From: Saleh M. <no-...@sk...> - 2012-10-22 02:03:51
|
<http://skillpages.com/s/oQAH_hvsEeKR/JK_IiDxn6Q2> Hi! Unlock new opportunities for you and your contacts. <http://skillpages.com/s/oQAH-hvsEeKR/JK_IiDxn6Q2> Saleh Massad Invite sent: 15 October, 2012 Join me on SkillPages <http://skillpages.com/s/oQAH-RvsEeKR/JK_IiDxn6Q2> nas...@li... was invited to join SkillPages by Saleh Massad. If you don't want to receive these emails from SkillPages in the future, you can unsubscribe <http://skillpages.com/s/oQAH_RvsEeKR/JK_IiDxn6Q2> . © 2012 SkillPages, Blackrock Business Park, Dublin, Ireland and 228 Hamilton Avenue, 3rd Floor, Palo Alto, CA 94301 |
|
From: Saleh M. <no-...@sk...> - 2012-10-15 09:21:19
|
<http://skillpages.com/s/TND/yXRapEeKMkuEaz7Gk4Q2> Hi! Unlock new opportunities for you and your contacts. <http://skillpages.com/s/TND/yWRapEeKMkuEaz7Gk4Q2> Saleh Massad Invite sent: 15 October, 2012 Join me on SkillPages <http://skillpages.com/s/TND/yWBapEeKMkuEaz7Gk4Q2> nas...@li... was invited to join SkillPages by Saleh Massad. If you don't want to receive these emails from SkillPages in the future, you can unsubscribe <http://skillpages.com/s/TND/yXBapEeKMkuEaz7Gk4Q2> . © 2012 SkillPages, Blackrock Business Park, Dublin, Ireland and 228 Hamilton Avenue, 3rd Floor, Palo Alto, CA 94301 |
|
From: Lila H. <utk...@gm...> - 2011-10-17 01:12:23
|
Hello! We are asking you for some help from the Open Source communities. As researchers at the University of Tennessee we are interested in discovering more about learning and interactions of members of the open source forums. This research is conducted through the University of Tennessee and is in no way associated with any forum organization. To further our research we would like input from forum members. The responses are very important to us so we can better understand what tools help forum members learn and have a productive experience in participation. To help: Take a survey about the tools you use in the forum. We are requesting approximately 15 minutes of your time to participate in our survey. Survey link: http://survey.utk.edu/mrIWeb/mrIWeb.dll?I.Project=FORUMLEARN *As a thank you, upon exiting the survey you will be given an opportunity to submit information to be entered in a drawing for a tablet computer ($500.00 Gift Card). * Please be assured that your answers will be confidential. No individual’s answers will ever be identified in any report. Should you have any questions about the project or our interest in using the results, we encourage you to contact Lila Holt, at lh...@ut...) or Vandana Singh at va...@ut.... Contact information you provide for the drawing is completely separate from your survey answers and there will be no way to identify participants in the actual survey responses. Nor will contact information be used for any other purpose. The odds of being selected will depend on the number of respondents to this survey. |
|
From: <A.K...@ls...> - 2011-06-30 19:16:03
|
Dear OS developer, I am an MSc student at the London School of Economics and I am doing research on the motivations of developers who participate in OS projects. The results from this questionnaire will be used within my MSc dissertation as empirical evidence. The questionnaire is designed in such a way that it will take only a few minutes to fill in. Please be assured that all responses will remain confidential and secure. Please answer all the questions. Thank you in advance for your time and support. You can start with the survey by clicking on the following link: http://questionpro.com/t/AGYOdZKm6G Please contact A.K...@ls... with any questions. Thank You Anastasios Kaperonis Please access the attached hyperlink for an important electronic communications disclaimer: http://lse.ac.uk/emailDisclaimer |
|
From: saleh m. <s.m...@gm...> - 2011-05-10 08:54:52
|
|
From: <amm...@us...> - 2010-09-06 16:49:17
|
Revision: 4099
http://nasa-exp.svn.sourceforge.net/nasa-exp/?rev=4099&view=rev
Author: ammianus
Date: 2010-09-06 16:49:11 +0000 (Mon, 06 Sep 2010)
Log Message:
-----------
Added error handling for WMS Url that returned no Available Layers to the WMSBrowserNG. Now with extra comments. Same as version in trunk.
Modified Paths:
--------------
branches/ammianus/WorldWind/WMSBrowserNG.cs
Modified: branches/ammianus/WorldWind/WMSBrowserNG.cs
===================================================================
--- branches/ammianus/WorldWind/WMSBrowserNG.cs 2010-09-06 16:43:53 UTC (rev 4098)
+++ branches/ammianus/WorldWind/WMSBrowserNG.cs 2010-09-06 16:49:11 UTC (rev 4099)
@@ -682,7 +682,14 @@
}
}
-
+
+ /// <summary>
+ /// Call back after available layers returned from WMS url.
+ /// Populates the first node as the default selection in the 'specify layer title' text box. Enables 'Create Layer' group box (Save as XML) in the UI.
+ /// If no layers are returned by URL, display message box error to the user.
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
private void treeOgcCaps_OperationDone(object sender, EventArgs e)
{
//if the URL is not good, it can crash WW, handle exception better
@@ -699,7 +706,6 @@
String logMsg = "WMS url did not return any valid layers " + wmsGetCapstextbox.Text;
Log.Write(Log.Levels.Error, "WBNG", logMsg);
MessageBox.Show("WMS url did not return any valid layers.");
- //treeOgcCaps.Enabled = false;
}
treeViewProgressBar.Visible = false;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <amm...@us...> - 2010-09-06 16:44:01
|
Revision: 4098
http://nasa-exp.svn.sourceforge.net/nasa-exp/?rev=4098&view=rev
Author: ammianus
Date: 2010-09-06 16:43:53 +0000 (Mon, 06 Sep 2010)
Log Message:
-----------
Added error handling for WMS Url that returned no Available Layers to the WMSBrowserNG.
Modified Paths:
--------------
trunk/WorldWind/WorldWind/WMSBrowserNG.cs
trunk/WorldWind/WorldWind/WMSBrowserNG.resx
Modified: trunk/WorldWind/WorldWind/WMSBrowserNG.cs
===================================================================
--- trunk/WorldWind/WorldWind/WMSBrowserNG.cs 2010-09-06 16:37:44 UTC (rev 4097)
+++ trunk/WorldWind/WorldWind/WMSBrowserNG.cs 2010-09-06 16:43:53 UTC (rev 4098)
@@ -107,15 +107,15 @@
this.pictureBoxProgressBar = new System.Windows.Forms.ProgressBar();
this.panelLower = new System.Windows.Forms.Panel();
this.panelContents = new System.Windows.Forms.Panel();
+ this.PasswordLabel = new System.Windows.Forms.Label();
+ this.PasswordTextBox = new System.Windows.Forms.TextBox();
+ this.UserNameLabel = new System.Windows.Forms.Label();
+ this.UsernameTextBox = new System.Windows.Forms.TextBox();
this.treeViewProgressBar = new System.Windows.Forms.ProgressBar();
this.label9 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.ConfLabel = new System.Windows.Forms.Label();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
- this.UsernameTextBox = new System.Windows.Forms.TextBox();
- this.UserNameLabel = new System.Windows.Forms.Label();
- this.PasswordLabel = new System.Windows.Forms.Label();
- this.PasswordTextBox = new System.Windows.Forms.TextBox();
this.xmlsaveGroupBox.SuspendLayout();
this.groupBox1.SuspendLayout();
this.panelLower.SuspendLayout();
@@ -126,10 +126,10 @@
//
this.treeOgcCaps.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(151)))), ((int)(((byte)(151)))), ((int)(((byte)(151)))));
this.treeOgcCaps.Credentials = null;
- this.treeOgcCaps.Location = new System.Drawing.Point(3, 206);
+ this.treeOgcCaps.Location = new System.Drawing.Point(2, 179);
this.treeOgcCaps.Name = "treeOgcCaps";
this.treeOgcCaps.Proxy = null;
- this.treeOgcCaps.Size = new System.Drawing.Size(610, 209);
+ this.treeOgcCaps.Size = new System.Drawing.Size(509, 181);
this.treeOgcCaps.TabIndex = 5;
this.toolTip1.SetToolTip(this.treeOgcCaps, "All data available from the requested WMS server. Highlight an item to show a pr" +
"eview image.");
@@ -144,9 +144,9 @@
"http://www.ga.gov.au/bin/getmap.pl?request=capabilities",
"http://www.geosignal.org/cgi-bin/wmsmap?",
"http://wms.globexplorer.com/gexservlets/wms?"});
- this.wmsGetCapstextbox.Location = new System.Drawing.Point(12, 158);
+ this.wmsGetCapstextbox.Location = new System.Drawing.Point(10, 137);
this.wmsGetCapstextbox.Name = "wmsGetCapstextbox";
- this.wmsGetCapstextbox.Size = new System.Drawing.Size(479, 24);
+ this.wmsGetCapstextbox.Size = new System.Drawing.Size(399, 21);
this.wmsGetCapstextbox.TabIndex = 20;
this.toolTip1.SetToolTip(this.wmsGetCapstextbox, "Enter a WMS server address or select one from the list. Note World Wnd only supp" +
"orts WGS:84 data.");
@@ -156,17 +156,17 @@
// label4
//
this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(12, 138);
+ this.label4.Location = new System.Drawing.Point(10, 120);
this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(65, 17);
+ this.label4.Size = new System.Drawing.Size(51, 13);
this.label4.TabIndex = 4;
this.label4.Text = "WMS url:";
//
// wmsbutton
//
- this.wmsbutton.Location = new System.Drawing.Point(498, 158);
+ this.wmsbutton.Location = new System.Drawing.Point(415, 137);
this.wmsbutton.Name = "wmsbutton";
- this.wmsbutton.Size = new System.Drawing.Size(109, 24);
+ this.wmsbutton.Size = new System.Drawing.Size(91, 21);
this.wmsbutton.TabIndex = 1;
this.wmsbutton.Text = "Get WMS Tree";
this.toolTip1.SetToolTip(this.wmsbutton, "Downloads the list of available imagery from the WMS server");
@@ -179,9 +179,9 @@
this.comboBox2.Items.AddRange(new object[] {
"png",
"jpeg"});
- this.comboBox2.Location = new System.Drawing.Point(235, 12);
+ this.comboBox2.Location = new System.Drawing.Point(196, 10);
this.comboBox2.Name = "comboBox2";
- this.comboBox2.Size = new System.Drawing.Size(85, 24);
+ this.comboBox2.Size = new System.Drawing.Size(71, 21);
this.comboBox2.TabIndex = 6;
this.comboBox2.Text = "jpeg";
this.toolTip1.SetToolTip(this.comboBox2, "Select image format to request, jpeg is best for imagery and png for vectors.");
@@ -190,9 +190,9 @@
// label5
//
this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(143, 15);
+ this.label5.Location = new System.Drawing.Point(119, 13);
this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(94, 17);
+ this.label5.Size = new System.Drawing.Size(71, 13);
this.label5.TabIndex = 7;
this.label5.Text = "Image Format";
//
@@ -207,9 +207,9 @@
this.xmlsaveGroupBox.Controls.Add(this.savewmsbutton);
this.xmlsaveGroupBox.Controls.Add(this.label2);
this.xmlsaveGroupBox.Enabled = false;
- this.xmlsaveGroupBox.Location = new System.Drawing.Point(25, 43);
+ this.xmlsaveGroupBox.Location = new System.Drawing.Point(21, 37);
this.xmlsaveGroupBox.Name = "xmlsaveGroupBox";
- this.xmlsaveGroupBox.Size = new System.Drawing.Size(322, 180);
+ this.xmlsaveGroupBox.Size = new System.Drawing.Size(268, 156);
this.xmlsaveGroupBox.TabIndex = 14;
this.xmlsaveGroupBox.TabStop = false;
this.xmlsaveGroupBox.Text = "Create layer";
@@ -218,9 +218,9 @@
//
this.label6.AutoSize = true;
this.label6.Enabled = false;
- this.label6.Location = new System.Drawing.Point(20, 53);
+ this.label6.Location = new System.Drawing.Point(17, 46);
this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(119, 17);
+ this.label6.Size = new System.Drawing.Size(89, 13);
this.label6.TabIndex = 13;
this.label6.Text = "Specify layer title:";
//
@@ -229,9 +229,9 @@
this.textBox3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(151)))), ((int)(((byte)(151)))), ((int)(((byte)(151)))));
this.textBox3.Enabled = false;
this.textBox3.ForeColor = System.Drawing.Color.White;
- this.textBox3.Location = new System.Drawing.Point(134, 50);
+ this.textBox3.Location = new System.Drawing.Point(112, 43);
this.textBox3.Name = "textBox3";
- this.textBox3.Size = new System.Drawing.Size(160, 22);
+ this.textBox3.Size = new System.Drawing.Size(133, 20);
this.textBox3.TabIndex = 12;
this.textBox3.Text = "WMS Layer";
this.toolTip1.SetToolTip(this.textBox3, "The name which will be shown in your layer manager for this data.");
@@ -242,9 +242,9 @@
this.checkBox1.AutoSize = true;
this.checkBox1.Checked = true;
this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked;
- this.checkBox1.Location = new System.Drawing.Point(73, 23);
+ this.checkBox1.Location = new System.Drawing.Point(61, 20);
this.checkBox1.Name = "checkBox1";
- this.checkBox1.Size = new System.Drawing.Size(239, 21);
+ this.checkBox1.Size = new System.Drawing.Size(179, 17);
this.checkBox1.TabIndex = 17;
this.checkBox1.Text = "Use default layer title from server";
this.checkBox1.UseVisualStyleBackColor = true;
@@ -253,9 +253,9 @@
// label7
//
this.label7.AutoSize = true;
- this.label7.Location = new System.Drawing.Point(70, 158);
+ this.label7.Location = new System.Drawing.Point(58, 137);
this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(213, 17);
+ this.label7.Size = new System.Drawing.Size(160, 13);
this.label7.TabIndex = 14;
this.label7.Text = "Warning: overwrites existing files";
this.label7.Click += new System.EventHandler(this.label7_Click);
@@ -263,9 +263,9 @@
// label3
//
this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(22, 98);
+ this.label3.Location = new System.Drawing.Point(18, 85);
this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(97, 17);
+ this.label3.Size = new System.Drawing.Size(74, 13);
this.label3.TabIndex = 11;
this.label3.Text = "XML filename:";
//
@@ -273,9 +273,9 @@
//
this.textBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(151)))), ((int)(((byte)(151)))), ((int)(((byte)(151)))));
this.textBox1.ForeColor = System.Drawing.Color.White;
- this.textBox1.Location = new System.Drawing.Point(118, 93);
+ this.textBox1.Location = new System.Drawing.Point(98, 81);
this.textBox1.Name = "textBox1";
- this.textBox1.Size = new System.Drawing.Size(159, 22);
+ this.textBox1.Size = new System.Drawing.Size(133, 20);
this.textBox1.TabIndex = 9;
this.textBox1.Text = "wms";
this.toolTip1.SetToolTip(this.textBox1, "The filename for the data, this will be stored in your Config\\PlanetName director" +
@@ -284,9 +284,9 @@
//
// savewmsbutton
//
- this.savewmsbutton.Location = new System.Drawing.Point(98, 123);
+ this.savewmsbutton.Location = new System.Drawing.Point(82, 107);
this.savewmsbutton.Name = "savewmsbutton";
- this.savewmsbutton.Size = new System.Drawing.Size(131, 32);
+ this.savewmsbutton.Size = new System.Drawing.Size(109, 27);
this.savewmsbutton.TabIndex = 5;
this.savewmsbutton.Text = "Save as XML";
this.toolTip1.SetToolTip(this.savewmsbutton, "Saves the file as XML and adds it to the layer manager");
@@ -296,9 +296,9 @@
// label2
//
this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(275, 98);
+ this.label2.Location = new System.Drawing.Point(229, 85);
this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(32, 17);
+ this.label2.Size = new System.Drawing.Size(25, 13);
this.label2.TabIndex = 10;
this.label2.Text = ".xml";
this.label2.Click += new System.EventHandler(this.label2_Click);
@@ -306,18 +306,18 @@
// groupBox1
//
this.groupBox1.Controls.Add(this.pictureBoxProgressBar);
- this.groupBox1.Location = new System.Drawing.Point(354, 7);
+ this.groupBox1.Location = new System.Drawing.Point(295, 6);
this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(257, 211);
+ this.groupBox1.Size = new System.Drawing.Size(214, 183);
this.groupBox1.TabIndex = 16;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Preview";
//
// pictureBoxProgressBar
//
- this.pictureBoxProgressBar.Location = new System.Drawing.Point(4, 196);
+ this.pictureBoxProgressBar.Location = new System.Drawing.Point(3, 170);
this.pictureBoxProgressBar.Name = "pictureBoxProgressBar";
- this.pictureBoxProgressBar.Size = new System.Drawing.Size(249, 20);
+ this.pictureBoxProgressBar.Size = new System.Drawing.Size(208, 17);
this.pictureBoxProgressBar.TabIndex = 16;
//
// panelLower
@@ -327,9 +327,9 @@
this.panelLower.Controls.Add(this.label5);
this.panelLower.Controls.Add(this.comboBox2);
this.panelLower.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.panelLower.Location = new System.Drawing.Point(0, 427);
+ this.panelLower.Location = new System.Drawing.Point(0, 459);
this.panelLower.Name = "panelLower";
- this.panelLower.Size = new System.Drawing.Size(702, 241);
+ this.panelLower.Size = new System.Drawing.Size(702, 209);
this.panelLower.TabIndex = 0;
this.panelLower.Paint += new System.Windows.Forms.PaintEventHandler(this.panelLower_Paint);
//
@@ -350,15 +350,48 @@
this.panelContents.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelContents.Location = new System.Drawing.Point(0, 0);
this.panelContents.Name = "panelContents";
- this.panelContents.Size = new System.Drawing.Size(702, 427);
+ this.panelContents.Size = new System.Drawing.Size(702, 459);
this.panelContents.TabIndex = 4;
//
+ // PasswordLabel
+ //
+ this.PasswordLabel.AutoSize = true;
+ this.PasswordLabel.Location = new System.Drawing.Point(100, 76);
+ this.PasswordLabel.Name = "PasswordLabel";
+ this.PasswordLabel.Size = new System.Drawing.Size(53, 13);
+ this.PasswordLabel.TabIndex = 24;
+ this.PasswordLabel.Text = "Password";
+ //
+ // PasswordTextBox
+ //
+ this.PasswordTextBox.Location = new System.Drawing.Point(102, 94);
+ this.PasswordTextBox.Name = "PasswordTextBox";
+ this.PasswordTextBox.PasswordChar = '*';
+ this.PasswordTextBox.Size = new System.Drawing.Size(84, 20);
+ this.PasswordTextBox.TabIndex = 23;
+ //
+ // UserNameLabel
+ //
+ this.UserNameLabel.AutoSize = true;
+ this.UserNameLabel.Location = new System.Drawing.Point(7, 76);
+ this.UserNameLabel.Name = "UserNameLabel";
+ this.UserNameLabel.Size = new System.Drawing.Size(55, 13);
+ this.UserNameLabel.TabIndex = 22;
+ this.UserNameLabel.Text = "Username";
+ //
+ // UsernameTextBox
+ //
+ this.UsernameTextBox.Location = new System.Drawing.Point(10, 94);
+ this.UsernameTextBox.Name = "UsernameTextBox";
+ this.UsernameTextBox.Size = new System.Drawing.Size(83, 20);
+ this.UsernameTextBox.TabIndex = 21;
+ //
// treeViewProgressBar
//
this.treeViewProgressBar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(151)))), ((int)(((byte)(151)))), ((int)(((byte)(151)))));
- this.treeViewProgressBar.Location = new System.Drawing.Point(358, 188);
+ this.treeViewProgressBar.Location = new System.Drawing.Point(298, 163);
this.treeViewProgressBar.Name = "treeViewProgressBar";
- this.treeViewProgressBar.Size = new System.Drawing.Size(249, 12);
+ this.treeViewProgressBar.Size = new System.Drawing.Size(208, 10);
this.treeViewProgressBar.TabIndex = 17;
this.toolTip1.SetToolTip(this.treeViewProgressBar, "Loading .... Please Wait.");
this.treeViewProgressBar.Visible = false;
@@ -366,9 +399,9 @@
// label9
//
this.label9.AutoSize = true;
- this.label9.Location = new System.Drawing.Point(14, 31);
+ this.label9.Location = new System.Drawing.Point(12, 27);
this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(516, 17);
+ this.label9.Size = new System.Drawing.Size(394, 13);
this.label9.TabIndex = 19;
this.label9.Text = "\x95 Fill in options and click \"Save as XML\" to add the all of the layers to World W" +
"ind";
@@ -376,9 +409,9 @@
// label8
//
this.label8.AutoSize = true;
- this.label8.Location = new System.Drawing.Point(14, 10);
+ this.label8.Location = new System.Drawing.Point(12, 9);
this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(620, 17);
+ this.label8.Size = new System.Drawing.Size(473, 13);
this.label8.TabIndex = 18;
this.label8.Text = "\x95 Enter a WMS url in the url bar below and click \"Get WMS Tree\" to see the conten" +
"ts of the server";
@@ -386,9 +419,9 @@
// ConfLabel
//
this.ConfLabel.AutoSize = true;
- this.ConfLabel.Location = new System.Drawing.Point(3, 188);
+ this.ConfLabel.Location = new System.Drawing.Point(2, 163);
this.ConfLabel.Name = "ConfLabel";
- this.ConfLabel.Size = new System.Drawing.Size(112, 17);
+ this.ConfLabel.Size = new System.Drawing.Size(84, 13);
this.ConfLabel.TabIndex = 4;
this.ConfLabel.Text = "Available Layers";
//
@@ -396,49 +429,16 @@
//
this.toolTip1.Popup += new System.Windows.Forms.PopupEventHandler(this.toolTip1_Popup);
//
- // UsernameTextBox
- //
- this.UsernameTextBox.Location = new System.Drawing.Point(12, 108);
- this.UsernameTextBox.Name = "UsernameTextBox";
- this.UsernameTextBox.Size = new System.Drawing.Size(100, 22);
- this.UsernameTextBox.TabIndex = 21;
- //
- // UserNameLabel
- //
- this.UserNameLabel.AutoSize = true;
- this.UserNameLabel.Location = new System.Drawing.Point(9, 88);
- this.UserNameLabel.Name = "UserNameLabel";
- this.UserNameLabel.Size = new System.Drawing.Size(73, 17);
- this.UserNameLabel.TabIndex = 22;
- this.UserNameLabel.Text = "Username";
- //
- // PasswordLabel
- //
- this.PasswordLabel.AutoSize = true;
- this.PasswordLabel.Location = new System.Drawing.Point(120, 88);
- this.PasswordLabel.Name = "PasswordLabel";
- this.PasswordLabel.Size = new System.Drawing.Size(69, 17);
- this.PasswordLabel.TabIndex = 24;
- this.PasswordLabel.Text = "Password";
- //
- // PasswordTextBox
- //
- this.PasswordTextBox.Location = new System.Drawing.Point(123, 108);
- this.PasswordTextBox.Name = "PasswordTextBox";
- this.PasswordTextBox.PasswordChar = '*';
- this.PasswordTextBox.Size = new System.Drawing.Size(100, 22);
- this.PasswordTextBox.TabIndex = 23;
- //
// WMSBrowserNG
//
- this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
+ this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(111)))), ((int)(((byte)(111)))), ((int)(((byte)(111)))));
this.ClientSize = new System.Drawing.Size(702, 668);
this.Controls.Add(this.panelContents);
this.Controls.Add(this.panelLower);
this.ForeColor = System.Drawing.Color.White;
this.KeyPreview = true;
- this.MinimumSize = new System.Drawing.Size(605, 557);
+ this.MinimumSize = new System.Drawing.Size(504, 483);
this.Name = "WMSBrowserNG";
this.Text = "WMS Importer";
this.toolTip1.SetToolTip(this, "Import WMS imagery to a World Wind layer.");
@@ -465,7 +465,7 @@
private void button1_Click(object sender, EventArgs e)
{
- treeOgcCaps.Nodes.Clear();
+ treeOgcCaps.Nodes.Clear();
treeOgcCaps.URL = wmsGetCapstextbox.Text;
//if (treeOgcCaps.URL.Contains("seyeqweb01dul"))
// treeOgcCaps.Credentials = new NetworkCredential("admin", "admin");
@@ -682,15 +682,31 @@
}
}
-
+
+ /// <summary>
+ /// Call back after available layers returned from WMS url.
+ /// Populates the first node as the default selection in the 'specify layer title' text box. Enables 'Create Layer' group box (Save as XML) in the UI.
+ /// If no layers are returned by URL, display message box error to the user.
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
private void treeOgcCaps_OperationDone(object sender, EventArgs e)
{
- TreeNode tn = treeOgcCaps.Nodes[0];
- LayerItem li = tn.Tag as LayerItem;
+ //if the URL is not good, it can crash WW, handle exception better
+ if (treeOgcCaps.Nodes != null && treeOgcCaps.Nodes.Count > 0)
+ {
+ TreeNode tn = treeOgcCaps.Nodes[0];
+ LayerItem li = tn.Tag as LayerItem;
- textBox3.Text = li.Title;
- xmlsaveGroupBox.Enabled = true;
-
+ textBox3.Text = li.Title;
+ xmlsaveGroupBox.Enabled = true;
+ }
+ else
+ {
+ String logMsg = "WMS url did not return any valid layers " + wmsGetCapstextbox.Text;
+ Log.Write(Log.Levels.Error, "WBNG", logMsg);
+ MessageBox.Show("WMS url did not return any valid layers.");
+ }
treeViewProgressBar.Visible = false;
}
Modified: trunk/WorldWind/WorldWind/WMSBrowserNG.resx
===================================================================
--- trunk/WorldWind/WorldWind/WMSBrowserNG.resx 2010-09-06 16:37:44 UTC (rev 4097)
+++ trunk/WorldWind/WorldWind/WMSBrowserNG.resx 2010-09-06 16:43:53 UTC (rev 4098)
@@ -123,9 +123,6 @@
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>183, 17</value>
</metadata>
- <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>183, 17</value>
- </metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>55</value>
</metadata>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <amm...@us...> - 2010-09-06 16:37:53
|
Revision: 4097
http://nasa-exp.svn.sourceforge.net/nasa-exp/?rev=4097&view=rev
Author: ammianus
Date: 2010-09-06 16:37:44 +0000 (Mon, 06 Sep 2010)
Log Message:
-----------
frank.evans: support authenticated WMS changes
WMSBrowserNG.cs
WMSLayerAccessor.cs
ConfigurationLoader.cs
WebDownload.cs
GeoSpatialDownloadRequest.cs
WMSBrowser.cs
WMSBrowserNG.cs
Modified Paths:
--------------
trunk/WorldWind/PluginSDK/ConfigurationLoader.cs
trunk/WorldWind/PluginSDK/Renderable/GeoSpatialDownloadRequest.cs
trunk/WorldWind/PluginSDK/WMSLayerAccessor.cs
trunk/WorldWind/WebDownload/WebDownload.cs
trunk/WorldWind/WorldWind/WMSBrowser.cs
trunk/WorldWind/WorldWind/WMSBrowserNG.cs
trunk/WorldWind/WorldWind/WMSBrowserNG.resx
Modified: trunk/WorldWind/PluginSDK/ConfigurationLoader.cs
===================================================================
--- trunk/WorldWind/PluginSDK/ConfigurationLoader.cs 2010-09-06 16:26:39 UTC (rev 4096)
+++ trunk/WorldWind/PluginSDK/ConfigurationLoader.cs 2010-09-06 16:37:44 UTC (rev 4097)
@@ -790,8 +790,13 @@
wmsLayerStore.Version = getInnerTextFromFirstChild(wmsAccessorIter.Current.Select("Version"));
wmsLayerStore.WMSLayerName = getInnerTextFromFirstChild(wmsAccessorIter.Current.Select("WMSLayerName"));
+
string username = getInnerTextFromFirstChild(wmsAccessorIter.Current.Select("Username"));
string password = getInnerTextFromFirstChild(wmsAccessorIter.Current.Select("Password"));
+
+ wmsLayerStore.Username = username;
+ wmsLayerStore.Password = password;
+
string wmsStyleName = getInnerTextFromFirstChild(wmsAccessorIter.Current.Select("WMSLayerStyle"));
string serverLogoPath = getInnerTextFromFirstChild(wmsAccessorIter.Current.Select("ServerLogoFilePath"));
string opacityString = getInnerTextFromFirstChild(wmsAccessorIter.Current.Select("Opacity"));
Modified: trunk/WorldWind/PluginSDK/Renderable/GeoSpatialDownloadRequest.cs
===================================================================
--- trunk/WorldWind/PluginSDK/Renderable/GeoSpatialDownloadRequest.cs 2010-09-06 16:26:39 UTC (rev 4096)
+++ trunk/WorldWind/PluginSDK/Renderable/GeoSpatialDownloadRequest.cs 2010-09-06 16:37:44 UTC (rev 4097)
@@ -24,6 +24,7 @@
m_url = downloadUrl;
m_localFilePath = localFilePath;
m_imageStore = imageStore;
+
}
/// <summary>
@@ -183,14 +184,25 @@
public virtual void StartDownload()
{
+
+
+
// Offline check
if (World.Settings.WorkOffline)
return;
Log.Write(Log.Levels.Debug, "GSDR", "Starting download for " + m_url);
// Log.Write(Log.Levels.Debug, "GSDR", "to be stored in "+this.m_imageStore.GetLocalPath(QuadTile));
+
+ WorldWind.Net.Wms.WmsImageStore wmsImageStore = m_imageStore as WorldWind.Net.Wms.WmsImageStore;
+ System.Net.NetworkCredential downloadCredentials = null;
+
+ if (wmsImageStore != null)
+ downloadCredentials = new System.Net.NetworkCredential(wmsImageStore.Username, wmsImageStore.Password);
+
QuadTile.IsDownloadingImage = true;
- download = new WebDownload(m_url);
+ download = new WebDownload(m_url, downloadCredentials);
+
download.DownloadType = DownloadType.Wms;
download.SavedFilePath = m_localFilePath + ".tmp";
download.ProgressCallback += new DownloadProgressHandler(UpdateProgress);
Modified: trunk/WorldWind/PluginSDK/WMSLayerAccessor.cs
===================================================================
--- trunk/WorldWind/PluginSDK/WMSLayerAccessor.cs 2010-09-06 16:26:39 UTC (rev 4096)
+++ trunk/WorldWind/PluginSDK/WMSLayerAccessor.cs 2010-09-06 16:37:44 UTC (rev 4097)
@@ -16,6 +16,8 @@
string m_wmsLayerStyle;
string m_imageFormat;
string m_version;
+ string m_username;
+ string m_password;
int m_textureSizePixels = 512;
#endregion
@@ -42,6 +44,32 @@
}
}
+
+ public virtual string Username
+ {
+ get
+ {
+ return m_username;
+ }
+ set
+ {
+ m_username = value;
+ }
+ }
+
+
+ public virtual string Password
+ {
+ get
+ {
+ return m_password;
+ }
+ set
+ {
+ m_password = value;
+ }
+ }
+
public virtual string WMSLayerName
{
get
@@ -149,6 +177,14 @@
XmlNode tileServiceNode = worldDoc.CreateElement("WMSAccessor");
+ XmlNode UsernameNode = worldDoc.CreateElement("Username");
+ UsernameNode.AppendChild(worldDoc.CreateTextNode(Username));
+ tileServiceNode.AppendChild(UsernameNode);
+
+ XmlNode PasswordNode = worldDoc.CreateElement("Password");
+ PasswordNode.AppendChild(worldDoc.CreateTextNode(Password));
+ tileServiceNode.AppendChild(PasswordNode);
+
XmlNode imageFormatNode = worldDoc.CreateElement("ImageFormat");
imageFormatNode.AppendChild(worldDoc.CreateTextNode(ImageFormat));
tileServiceNode.AppendChild(imageFormatNode);
Modified: trunk/WorldWind/WebDownload/WebDownload.cs
===================================================================
--- trunk/WorldWind/WebDownload/WebDownload.cs 2010-09-06 16:26:39 UTC (rev 4096)
+++ trunk/WorldWind/WebDownload/WebDownload.cs 2010-09-06 16:37:44 UTC (rev 4097)
@@ -54,6 +54,9 @@
public string SavedFilePath;
public bool IsComplete;
+ public NetworkCredential RequestCredentials;
+ public int RequestTimeout = 0;
+
/// <summary>
/// Called when data is being received.
/// Note that totalBytes will be zero if the server does not respond with content-length.
@@ -112,6 +115,14 @@
this.Url = url;
}
+ public WebDownload(string url, NetworkCredential credentials)
+ {
+ this.Url = url;
+ this.RequestCredentials = credentials;
+ }
+
+
+
/// <summary>
/// Initializes a new instance of the <see cref="T:WorldWind.Net.WebDownload"/> class.
/// </summary>
@@ -404,6 +415,13 @@
// Create the request object.
request = (HttpWebRequest)WebRequest.Create(Url);
request.UserAgent = UserAgent;
+
+ request.Credentials = RequestCredentials;
+ if (RequestTimeout != 0)
+ request.Timeout = RequestTimeout;
+
+
+
@@ -440,6 +458,7 @@
bool VerifyServerCertificate(Object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
{
+
if (sslPolicyErrors == SslPolicyErrors.None) return true;
foreach (X509ChainStatus s in chain.ChainStatus)
@@ -481,6 +500,10 @@
Log.Write(Log.Levels.Debug, "Starting sync download for " + this.Url);
+ //Cookie foo = new Cookie();
+ //request.CookieContainer.Add(foo);
+
+ //request.co
Debug.Assert(Url.StartsWith("http"));
DownloadStartTime = DateTime.Now;
try
@@ -1027,10 +1050,14 @@
//no - let these errors also rise up to the request to handle (ie a 404 will not get requested again)
throw Exception;
}
+ else if (response == null)
+ {
+ return;
+ }
else if (response.StatusCode == System.Net.HttpStatusCode.PartialContent)
{
//treat 206 Partial Content as an Exception
- WebException partialDownloadException = new WebException("Partial Download Response",null,WebExceptionStatus.ReceiveFailure,response);
+ WebException partialDownloadException = new WebException("Partial Download Response", null, WebExceptionStatus.ReceiveFailure, response);
throw partialDownloadException;
}
else if (response.StatusCode == System.Net.HttpStatusCode.OK && response.ContentLength == 0)
Modified: trunk/WorldWind/WorldWind/WMSBrowser.cs
===================================================================
--- trunk/WorldWind/WorldWind/WMSBrowser.cs 2010-09-06 16:26:39 UTC (rev 4096)
+++ trunk/WorldWind/WorldWind/WMSBrowser.cs 2010-09-06 16:37:44 UTC (rev 4097)
@@ -951,7 +951,9 @@
{
string url = curServer.ServerUrl.Value + (curServer.ServerUrl.Value.IndexOf("?") > 0 ? "&request=GetCapabilities&service=WMS&version=" + curServer.Version.Value : "?request=GetCapabilities&service=WMS&version=" + curServer.Version.Value);
using (WebDownload download = new WebDownload(url))
+ {
download.DownloadFile(xmlPath);
+ }
}
this.wmsList = new WMSList(curServer.Name.Value, curServer.ServerUrl.Value, xmlPath, curServer.Version.Value);
Modified: trunk/WorldWind/WorldWind/WMSBrowserNG.cs
===================================================================
--- trunk/WorldWind/WorldWind/WMSBrowserNG.cs 2010-09-06 16:26:39 UTC (rev 4096)
+++ trunk/WorldWind/WorldWind/WMSBrowserNG.cs 2010-09-06 16:37:44 UTC (rev 4097)
@@ -52,7 +52,7 @@
private Button savewmsbutton;
private Label label2;
private GroupBox groupBox1;
- private CarbonTools.Controls.PictureBoxOGC pictureBoxOGC1;
+ //private CarbonTools.Controls.PictureBoxOGC pictureBoxOGC1;
private Panel panelLower;
private Panel panelContents;
private Label ConfLabel;
@@ -62,6 +62,10 @@
private Label label8;
private ToolTip toolTip1;
private IContainer components;
+ private Label PasswordLabel;
+ private TextBox PasswordTextBox;
+ private Label UserNameLabel;
+ private TextBox UsernameTextBox;
private CarbonTools.Controls.TreeViewOGCCapabilities treeOgcCaps;
@@ -100,7 +104,6 @@
this.savewmsbutton = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.pictureBoxOGC1 = new CarbonTools.Controls.PictureBoxOGC();
this.pictureBoxProgressBar = new System.Windows.Forms.ProgressBar();
this.panelLower = new System.Windows.Forms.Panel();
this.panelContents = new System.Windows.Forms.Panel();
@@ -109,9 +112,12 @@
this.label8 = new System.Windows.Forms.Label();
this.ConfLabel = new System.Windows.Forms.Label();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
+ this.UsernameTextBox = new System.Windows.Forms.TextBox();
+ this.UserNameLabel = new System.Windows.Forms.Label();
+ this.PasswordLabel = new System.Windows.Forms.Label();
+ this.PasswordTextBox = new System.Windows.Forms.TextBox();
this.xmlsaveGroupBox.SuspendLayout();
this.groupBox1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.pictureBoxOGC1)).BeginInit();
this.panelLower.SuspendLayout();
this.panelContents.SuspendLayout();
this.SuspendLayout();
@@ -120,10 +126,10 @@
//
this.treeOgcCaps.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(151)))), ((int)(((byte)(151)))), ((int)(((byte)(151)))));
this.treeOgcCaps.Credentials = null;
- this.treeOgcCaps.Location = new System.Drawing.Point(3, 107);
+ this.treeOgcCaps.Location = new System.Drawing.Point(3, 206);
this.treeOgcCaps.Name = "treeOgcCaps";
this.treeOgcCaps.Proxy = null;
- this.treeOgcCaps.Size = new System.Drawing.Size(509, 181);
+ this.treeOgcCaps.Size = new System.Drawing.Size(610, 209);
this.treeOgcCaps.TabIndex = 5;
this.toolTip1.SetToolTip(this.treeOgcCaps, "All data available from the requested WMS server. Highlight an item to show a pr" +
"eview image.");
@@ -138,9 +144,9 @@
"http://www.ga.gov.au/bin/getmap.pl?request=capabilities",
"http://www.geosignal.org/cgi-bin/wmsmap?",
"http://wms.globexplorer.com/gexservlets/wms?"});
- this.wmsGetCapstextbox.Location = new System.Drawing.Point(3, 62);
+ this.wmsGetCapstextbox.Location = new System.Drawing.Point(12, 158);
this.wmsGetCapstextbox.Name = "wmsGetCapstextbox";
- this.wmsGetCapstextbox.Size = new System.Drawing.Size(407, 21);
+ this.wmsGetCapstextbox.Size = new System.Drawing.Size(479, 24);
this.wmsGetCapstextbox.TabIndex = 20;
this.toolTip1.SetToolTip(this.wmsGetCapstextbox, "Enter a WMS server address or select one from the list. Note World Wnd only supp" +
"orts WGS:84 data.");
@@ -150,17 +156,17 @@
// label4
//
this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(7, 46);
+ this.label4.Location = new System.Drawing.Point(12, 138);
this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(79, 13);
+ this.label4.Size = new System.Drawing.Size(65, 17);
this.label4.TabIndex = 4;
- this.label4.Text = "Enter WMS url:";
+ this.label4.Text = "WMS url:";
//
// wmsbutton
//
- this.wmsbutton.Location = new System.Drawing.Point(416, 62);
+ this.wmsbutton.Location = new System.Drawing.Point(498, 158);
this.wmsbutton.Name = "wmsbutton";
- this.wmsbutton.Size = new System.Drawing.Size(91, 21);
+ this.wmsbutton.Size = new System.Drawing.Size(109, 24);
this.wmsbutton.TabIndex = 1;
this.wmsbutton.Text = "Get WMS Tree";
this.toolTip1.SetToolTip(this.wmsbutton, "Downloads the list of available imagery from the WMS server");
@@ -173,9 +179,9 @@
this.comboBox2.Items.AddRange(new object[] {
"png",
"jpeg"});
- this.comboBox2.Location = new System.Drawing.Point(196, 10);
+ this.comboBox2.Location = new System.Drawing.Point(235, 12);
this.comboBox2.Name = "comboBox2";
- this.comboBox2.Size = new System.Drawing.Size(71, 21);
+ this.comboBox2.Size = new System.Drawing.Size(85, 24);
this.comboBox2.TabIndex = 6;
this.comboBox2.Text = "jpeg";
this.toolTip1.SetToolTip(this.comboBox2, "Select image format to request, jpeg is best for imagery and png for vectors.");
@@ -184,9 +190,9 @@
// label5
//
this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(119, 13);
+ this.label5.Location = new System.Drawing.Point(143, 15);
this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(71, 13);
+ this.label5.Size = new System.Drawing.Size(94, 17);
this.label5.TabIndex = 7;
this.label5.Text = "Image Format";
//
@@ -201,9 +207,9 @@
this.xmlsaveGroupBox.Controls.Add(this.savewmsbutton);
this.xmlsaveGroupBox.Controls.Add(this.label2);
this.xmlsaveGroupBox.Enabled = false;
- this.xmlsaveGroupBox.Location = new System.Drawing.Point(21, 37);
+ this.xmlsaveGroupBox.Location = new System.Drawing.Point(25, 43);
this.xmlsaveGroupBox.Name = "xmlsaveGroupBox";
- this.xmlsaveGroupBox.Size = new System.Drawing.Size(268, 156);
+ this.xmlsaveGroupBox.Size = new System.Drawing.Size(322, 180);
this.xmlsaveGroupBox.TabIndex = 14;
this.xmlsaveGroupBox.TabStop = false;
this.xmlsaveGroupBox.Text = "Create layer";
@@ -212,9 +218,9 @@
//
this.label6.AutoSize = true;
this.label6.Enabled = false;
- this.label6.Location = new System.Drawing.Point(17, 46);
+ this.label6.Location = new System.Drawing.Point(20, 53);
this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(89, 13);
+ this.label6.Size = new System.Drawing.Size(119, 17);
this.label6.TabIndex = 13;
this.label6.Text = "Specify layer title:";
//
@@ -223,9 +229,9 @@
this.textBox3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(151)))), ((int)(((byte)(151)))), ((int)(((byte)(151)))));
this.textBox3.Enabled = false;
this.textBox3.ForeColor = System.Drawing.Color.White;
- this.textBox3.Location = new System.Drawing.Point(112, 43);
+ this.textBox3.Location = new System.Drawing.Point(134, 50);
this.textBox3.Name = "textBox3";
- this.textBox3.Size = new System.Drawing.Size(133, 20);
+ this.textBox3.Size = new System.Drawing.Size(160, 22);
this.textBox3.TabIndex = 12;
this.textBox3.Text = "WMS Layer";
this.toolTip1.SetToolTip(this.textBox3, "The name which will be shown in your layer manager for this data.");
@@ -236,9 +242,9 @@
this.checkBox1.AutoSize = true;
this.checkBox1.Checked = true;
this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked;
- this.checkBox1.Location = new System.Drawing.Point(61, 20);
+ this.checkBox1.Location = new System.Drawing.Point(73, 23);
this.checkBox1.Name = "checkBox1";
- this.checkBox1.Size = new System.Drawing.Size(179, 17);
+ this.checkBox1.Size = new System.Drawing.Size(239, 21);
this.checkBox1.TabIndex = 17;
this.checkBox1.Text = "Use default layer title from server";
this.checkBox1.UseVisualStyleBackColor = true;
@@ -247,9 +253,9 @@
// label7
//
this.label7.AutoSize = true;
- this.label7.Location = new System.Drawing.Point(58, 137);
+ this.label7.Location = new System.Drawing.Point(70, 158);
this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(160, 13);
+ this.label7.Size = new System.Drawing.Size(213, 17);
this.label7.TabIndex = 14;
this.label7.Text = "Warning: overwrites existing files";
this.label7.Click += new System.EventHandler(this.label7_Click);
@@ -257,9 +263,9 @@
// label3
//
this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(18, 85);
+ this.label3.Location = new System.Drawing.Point(22, 98);
this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(74, 13);
+ this.label3.Size = new System.Drawing.Size(97, 17);
this.label3.TabIndex = 11;
this.label3.Text = "XML filename:";
//
@@ -267,9 +273,9 @@
//
this.textBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(151)))), ((int)(((byte)(151)))), ((int)(((byte)(151)))));
this.textBox1.ForeColor = System.Drawing.Color.White;
- this.textBox1.Location = new System.Drawing.Point(98, 81);
+ this.textBox1.Location = new System.Drawing.Point(118, 93);
this.textBox1.Name = "textBox1";
- this.textBox1.Size = new System.Drawing.Size(133, 20);
+ this.textBox1.Size = new System.Drawing.Size(159, 22);
this.textBox1.TabIndex = 9;
this.textBox1.Text = "wms";
this.toolTip1.SetToolTip(this.textBox1, "The filename for the data, this will be stored in your Config\\PlanetName director" +
@@ -278,9 +284,9 @@
//
// savewmsbutton
//
- this.savewmsbutton.Location = new System.Drawing.Point(82, 107);
+ this.savewmsbutton.Location = new System.Drawing.Point(98, 123);
this.savewmsbutton.Name = "savewmsbutton";
- this.savewmsbutton.Size = new System.Drawing.Size(109, 27);
+ this.savewmsbutton.Size = new System.Drawing.Size(131, 32);
this.savewmsbutton.TabIndex = 5;
this.savewmsbutton.Text = "Save as XML";
this.toolTip1.SetToolTip(this.savewmsbutton, "Saves the file as XML and adds it to the layer manager");
@@ -290,50 +296,28 @@
// label2
//
this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(229, 85);
+ this.label2.Location = new System.Drawing.Point(275, 98);
this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(25, 13);
+ this.label2.Size = new System.Drawing.Size(32, 17);
this.label2.TabIndex = 10;
this.label2.Text = ".xml";
this.label2.Click += new System.EventHandler(this.label2_Click);
//
// groupBox1
//
- this.groupBox1.Controls.Add(this.pictureBoxOGC1);
this.groupBox1.Controls.Add(this.pictureBoxProgressBar);
- this.groupBox1.Location = new System.Drawing.Point(295, 6);
+ this.groupBox1.Location = new System.Drawing.Point(354, 7);
this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(214, 183);
+ this.groupBox1.Size = new System.Drawing.Size(257, 211);
this.groupBox1.TabIndex = 16;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Preview";
//
- // pictureBoxOGC1
- //
- this.pictureBoxOGC1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(151)))), ((int)(((byte)(151)))), ((int)(((byte)(151)))));
- this.pictureBoxOGC1.Credentials = null;
- this.pictureBoxOGC1.ImageFormat = "";
- this.pictureBoxOGC1.LayerName = "";
- this.pictureBoxOGC1.LayerNamespace = "";
- this.pictureBoxOGC1.LayerStyle = "";
- this.pictureBoxOGC1.Location = new System.Drawing.Point(3, 19);
- this.pictureBoxOGC1.MapToolRectColor = System.Drawing.Color.Red;
- this.pictureBoxOGC1.Name = "pictureBoxOGC1";
- this.pictureBoxOGC1.Proxy = null;
- this.pictureBoxOGC1.Size = new System.Drawing.Size(208, 148);
- this.pictureBoxOGC1.StyleBrushColor = System.Drawing.Color.White;
- this.pictureBoxOGC1.StylePenColor = System.Drawing.Color.Black;
- this.pictureBoxOGC1.TabIndex = 15;
- this.pictureBoxOGC1.TabStop = false;
- this.toolTip1.SetToolTip(this.pictureBoxOGC1, "overeview image from WMS server.");
- this.pictureBoxOGC1.URL = "";
- this.pictureBoxOGC1.ZoomEffectFrames = 0;
- //
// pictureBoxProgressBar
//
- this.pictureBoxProgressBar.Location = new System.Drawing.Point(3, 170);
+ this.pictureBoxProgressBar.Location = new System.Drawing.Point(4, 196);
this.pictureBoxProgressBar.Name = "pictureBoxProgressBar";
- this.pictureBoxProgressBar.Size = new System.Drawing.Size(208, 17);
+ this.pictureBoxProgressBar.Size = new System.Drawing.Size(249, 20);
this.pictureBoxProgressBar.TabIndex = 16;
//
// panelLower
@@ -343,14 +327,18 @@
this.panelLower.Controls.Add(this.label5);
this.panelLower.Controls.Add(this.comboBox2);
this.panelLower.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.panelLower.Location = new System.Drawing.Point(0, 294);
+ this.panelLower.Location = new System.Drawing.Point(0, 427);
this.panelLower.Name = "panelLower";
- this.panelLower.Size = new System.Drawing.Size(529, 209);
+ this.panelLower.Size = new System.Drawing.Size(702, 241);
this.panelLower.TabIndex = 0;
this.panelLower.Paint += new System.Windows.Forms.PaintEventHandler(this.panelLower_Paint);
//
// panelContents
//
+ this.panelContents.Controls.Add(this.PasswordLabel);
+ this.panelContents.Controls.Add(this.PasswordTextBox);
+ this.panelContents.Controls.Add(this.UserNameLabel);
+ this.panelContents.Controls.Add(this.UsernameTextBox);
this.panelContents.Controls.Add(this.treeViewProgressBar);
this.panelContents.Controls.Add(this.treeOgcCaps);
this.panelContents.Controls.Add(this.label9);
@@ -362,15 +350,15 @@
this.panelContents.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelContents.Location = new System.Drawing.Point(0, 0);
this.panelContents.Name = "panelContents";
- this.panelContents.Size = new System.Drawing.Size(529, 294);
+ this.panelContents.Size = new System.Drawing.Size(702, 427);
this.panelContents.TabIndex = 4;
//
// treeViewProgressBar
//
this.treeViewProgressBar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(151)))), ((int)(((byte)(151)))), ((int)(((byte)(151)))));
- this.treeViewProgressBar.Location = new System.Drawing.Point(299, 91);
+ this.treeViewProgressBar.Location = new System.Drawing.Point(358, 188);
this.treeViewProgressBar.Name = "treeViewProgressBar";
- this.treeViewProgressBar.Size = new System.Drawing.Size(208, 10);
+ this.treeViewProgressBar.Size = new System.Drawing.Size(249, 12);
this.treeViewProgressBar.TabIndex = 17;
this.toolTip1.SetToolTip(this.treeViewProgressBar, "Loading .... Please Wait.");
this.treeViewProgressBar.Visible = false;
@@ -378,9 +366,9 @@
// label9
//
this.label9.AutoSize = true;
- this.label9.Location = new System.Drawing.Point(12, 27);
+ this.label9.Location = new System.Drawing.Point(14, 31);
this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(394, 13);
+ this.label9.Size = new System.Drawing.Size(516, 17);
this.label9.TabIndex = 19;
this.label9.Text = "\x95 Fill in options and click \"Save as XML\" to add the all of the layers to World W" +
"ind";
@@ -388,9 +376,9 @@
// label8
//
this.label8.AutoSize = true;
- this.label8.Location = new System.Drawing.Point(12, 9);
+ this.label8.Location = new System.Drawing.Point(14, 10);
this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(473, 13);
+ this.label8.Size = new System.Drawing.Size(620, 17);
this.label8.TabIndex = 18;
this.label8.Text = "\x95 Enter a WMS url in the url bar below and click \"Get WMS Tree\" to see the conten" +
"ts of the server";
@@ -398,9 +386,9 @@
// ConfLabel
//
this.ConfLabel.AutoSize = true;
- this.ConfLabel.Location = new System.Drawing.Point(3, 91);
+ this.ConfLabel.Location = new System.Drawing.Point(3, 188);
this.ConfLabel.Name = "ConfLabel";
- this.ConfLabel.Size = new System.Drawing.Size(84, 13);
+ this.ConfLabel.Size = new System.Drawing.Size(112, 17);
this.ConfLabel.TabIndex = 4;
this.ConfLabel.Text = "Available Layers";
//
@@ -408,16 +396,49 @@
//
this.toolTip1.Popup += new System.Windows.Forms.PopupEventHandler(this.toolTip1_Popup);
//
+ // UsernameTextBox
+ //
+ this.UsernameTextBox.Location = new System.Drawing.Point(12, 108);
+ this.UsernameTextBox.Name = "UsernameTextBox";
+ this.UsernameTextBox.Size = new System.Drawing.Size(100, 22);
+ this.UsernameTextBox.TabIndex = 21;
+ //
+ // UserNameLabel
+ //
+ this.UserNameLabel.AutoSize = true;
+ this.UserNameLabel.Location = new System.Drawing.Point(9, 88);
+ this.UserNameLabel.Name = "UserNameLabel";
+ this.UserNameLabel.Size = new System.Drawing.Size(73, 17);
+ this.UserNameLabel.TabIndex = 22;
+ this.UserNameLabel.Text = "Username";
+ //
+ // PasswordLabel
+ //
+ this.PasswordLabel.AutoSize = true;
+ this.PasswordLabel.Location = new System.Drawing.Point(120, 88);
+ this.PasswordLabel.Name = "PasswordLabel";
+ this.PasswordLabel.Size = new System.Drawing.Size(69, 17);
+ this.PasswordLabel.TabIndex = 24;
+ this.PasswordLabel.Text = "Password";
+ //
+ // PasswordTextBox
+ //
+ this.PasswordTextBox.Location = new System.Drawing.Point(123, 108);
+ this.PasswordTextBox.Name = "PasswordTextBox";
+ this.PasswordTextBox.PasswordChar = '*';
+ this.PasswordTextBox.Size = new System.Drawing.Size(100, 22);
+ this.PasswordTextBox.TabIndex = 23;
+ //
// WMSBrowserNG
//
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+ this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(111)))), ((int)(((byte)(111)))), ((int)(((byte)(111)))));
- this.ClientSize = new System.Drawing.Size(529, 503);
+ this.ClientSize = new System.Drawing.Size(702, 668);
this.Controls.Add(this.panelContents);
this.Controls.Add(this.panelLower);
this.ForeColor = System.Drawing.Color.White;
this.KeyPreview = true;
- this.MinimumSize = new System.Drawing.Size(504, 483);
+ this.MinimumSize = new System.Drawing.Size(605, 557);
this.Name = "WMSBrowserNG";
this.Text = "WMS Importer";
this.toolTip1.SetToolTip(this, "Import WMS imagery to a World Wind layer.");
@@ -425,7 +446,6 @@
this.xmlsaveGroupBox.ResumeLayout(false);
this.xmlsaveGroupBox.PerformLayout();
this.groupBox1.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.pictureBoxOGC1)).EndInit();
this.panelLower.ResumeLayout(false);
this.panelLower.PerformLayout();
this.panelContents.ResumeLayout(false);
@@ -445,13 +465,33 @@
private void button1_Click(object sender, EventArgs e)
{
-
treeOgcCaps.Nodes.Clear();
treeOgcCaps.URL = wmsGetCapstextbox.Text;
+ //if (treeOgcCaps.URL.Contains("seyeqweb01dul"))
+ // treeOgcCaps.Credentials = new NetworkCredential("admin", "admin");
+ if (UsernameTextBox.Text != "")
+ {
+ NetworkCredential creds = new NetworkCredential(UsernameTextBox.Text, PasswordTextBox.Text);
+ //NetworkCredential basicCred = creds.GetCredential(new Uri(wmsGetCapstextbox.Text), "Basic");
+ treeOgcCaps.Credentials = creds;
+ }
+
+ //treeOgcCaps.Version = "1.3.0";
+
+ //treeOgcCaps.Proxy = ProxyHelper.DetermineProxyForUrl(treeOgcCaps.URL, true, true, "http://192.168.25.13/proxy.pac", "", "");
+
+ //treeOgcCaps.ServiceType = OGCServiceTypes.WMS;
+ //CarbonTools.Core.OGCCapabilities.DataOGCCapabilities foo = new DataOGCCapabilities();
+ //CarbonTools.Core.WMS.SourceWMS swms = new CarbonTools.Core.WMS.SourceWMS();
+ //SourceOGCCapabilities bar = new SourceOGCCapabilities();
+
treeViewProgressBar.Visible = true;
- treeOgcCaps.GetCapabilities();
+ treeOgcCaps.GetCapabilities();
+ //treeOgcCaps.node
+
+
System.Windows.Forms.Timer treeViewTimer = new System.Windows.Forms.Timer();
treeViewTimer.Enabled = true;
treeViewTimer.Interval = 50;
@@ -469,11 +509,10 @@
private void savewmsbutton_Click(object sender, EventArgs e)
{
- string wmslayerset = "<LayerSet Name=\"" + textBox3.Text + "\" ShowOnlyOneLayer=\"false\" ShowAtStartup=\"true\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"LayerSet.xsd\">\n";
- wmslayerset += ParseNodeChildren(treeOgcCaps.Nodes[0]);
-
+ string wmslayerset = "<LayerSet Name=\"" + textBox3.Text + "\" ShowOnlyOneLayer=\"false\" ShowAtStartup=\"true\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"LayerSet.xsd\">\n";
+ wmslayerset += ParseNodeChildren(treeOgcCaps.Nodes[0], UsernameTextBox.Text, PasswordTextBox.Text);
wmslayerset += "</LayerSet>";
XmlDocument doc = new XmlDocument();
@@ -497,7 +536,7 @@
}
- private string ConvertLayerToWMS(LayerItem layer)
+ private string ConvertLayerToWMS(LayerItem layer, string Username, string Password)
{
//TODO: Add layer abstracts from wms as <Description> in xml
@@ -509,6 +548,8 @@
string imageType = comboBox2.Text;
skeleton = ReadSkeleton(FILE_NAME);
+ skeleton = skeleton.Replace(@"$USERNAME", Username);
+ skeleton = skeleton.Replace(@"$PASSWORD", Password);
skeleton = skeleton.Replace(@"$NAME", ConvertToXMLEntities(layer.Title));
skeleton = skeleton.Replace(@"$NBB", layer.LLBoundingBox.MaxY.ToString(CultureInfo.InvariantCulture));
skeleton = skeleton.Replace(@"$SBB", layer.LLBoundingBox.MinY.ToString(CultureInfo.InvariantCulture));
@@ -522,11 +563,11 @@
if (wmsGetCapstextbox.Text.ToLowerInvariant().Contains("map="))
{
mapfilepath = Regex.Match(wmsGetCapstextbox.Text, "map=.*\\.map").Value;
- skeleton = skeleton.Replace(@"$LAYERNAME", layer.Name + @"&TRANSPARENT=TRUE&BGCOLOR=0xFF00FF&" + mapfilepath);
+ skeleton = skeleton.Replace(@"$LAYERNAME", layer.Name + @"&TRANSPARENT=TRUE&BGCOLOR=0x000000&" + mapfilepath);
}
else
{
- skeleton = skeleton.Replace(@"$LAYERNAME", layer.Name + @"&TRANSPARENT=TRUE&BGCOLOR=0xFF00FF");
+ skeleton = skeleton.Replace(@"$LAYERNAME", layer.Name + @"&TRANSPARENT=TRUE&BGCOLOR=0x000000");
}
skeleton = skeleton.Replace(@"$SERVER", ConvertToXMLEntities(wmsGetMap));
@@ -534,10 +575,9 @@
skeleton = skeleton.Replace(@"$IMAGETYPE", ConvertToXMLEntities(imageType));
return skeleton;
+ }
- }
-
private static string ReadSkeleton(string FILE_NAME)
{
string skeleton = null;
@@ -611,17 +651,17 @@
// Set map view paramerters
- pictureBoxOGC1.URL = treeOgcCaps.URL;
- pictureBoxOGC1.ServiceType = OGCServiceTypes.WMS;
- pictureBoxOGC1.LayerName = layer.Name; // Set layer name
- pictureBoxProgressBar.Value = 0;
+ //pictureBoxOGC1.URL = treeOgcCaps.URL;
+ //pictureBoxOGC1.ServiceType = OGCServiceTypes.WMS;
+ //pictureBoxOGC1.LayerName = layer.Name; // Set layer name
+ //pictureBoxProgressBar.Value = 0;
// Update image
- pictureBoxOGC1.GetImage();
+ //pictureBoxOGC1.GetImage();
- System.Windows.Forms.Timer pictureBoxTimer = new System.Windows.Forms.Timer();
- pictureBoxTimer.Enabled = true;
- pictureBoxTimer.Interval = 50;
- pictureBoxTimer.Tick += new EventHandler(pictureBoxTimer_Tick);
+ //System.Windows.Forms.Timer pictureBoxTimer = new System.Windows.Forms.Timer();
+ //pictureBoxTimer.Enabled = true;
+ //pictureBoxTimer.Interval = 50;
+ //pictureBoxTimer.Tick += new EventHandler(pictureBoxTimer_Tick);
}
@@ -654,7 +694,11 @@
treeViewProgressBar.Visible = false;
}
- private string ParseNodeChildren(TreeNode node)
+
+
+
+
+ private string ParseNodeChildren(TreeNode node, string Username, string Password)
{
string returned = null;
@@ -670,7 +714,7 @@
foreach (TreeNode subNode in node.Nodes)
{
- returned += ParseNodeChildren(subNode);
+ returned += ParseNodeChildren(subNode, Username, Password);
}
if (node.Level != 0)
@@ -684,16 +728,16 @@
{
LayerItem li = node.Tag as LayerItem;
- returned += ConvertLayerToWMS(li);
+ returned += ConvertLayerToWMS(li, Username, Password);
return returned;
}
}
- private void pictureBoxTimer_Tick(object sender, EventArgs e)
- {
- pictureBoxProgressBar.Value = pictureBoxOGC1.GetProgress(100);
- }
+ //private void pictureBoxTimer_Tick(object sender, EventArgs e)
+ //{
+ // pictureBoxProgressBar.Value = pictureBoxOGC1.GetProgress(100);
+ //}
private void treeViewTimer_Tick(object sender, EventArgs e)
{
Modified: trunk/WorldWind/WorldWind/WMSBrowserNG.resx
===================================================================
--- trunk/WorldWind/WorldWind/WMSBrowserNG.resx 2010-09-06 16:26:39 UTC (rev 4096)
+++ trunk/WorldWind/WorldWind/WMSBrowserNG.resx 2010-09-06 16:37:44 UTC (rev 4097)
@@ -123,16 +123,8 @@
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>183, 17</value>
</metadata>
- <metadata name="pictureBoxOGC1.BBox" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>
- AAEAAAD/////AQAAAAAAAAAMAgAAAFVDYXJib25Ub29scy5Db3JlLCBWZXJzaW9uPTIuMS4xMDAuMCwg
- Q3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1lMTcwNjJiZmIyMTRiOTBjBQEAAAAhQ2FyYm9u
- VG9vbHMuQ29yZS5CYXNlLkJvdW5kaW5nQm94BwAAAARtaW54BG1pbnkEbWluegRtYXh4BG1heHkEbWF4
- egNjcnMAAAAAAAAEBgYGBgYGL0NhcmJvblRvb2xzLkNvcmUuQmFzZS5Db29yZGluYXRlUmVmZXJlbmNl
- U3lzdGVtAgAAAAIAAAAAAAAAAIBmwAAAAAAAgFbAAAAAAAAA+P8AAAAAAIBmQAAAAAAAgFZAAAAAAAAA
- +P8JAwAAAAUDAAAAL0NhcmJvblRvb2xzLkNvcmUuQmFzZS5Db29yZGluYXRlUmVmZXJlbmNlU3lzdGVt
- AQAAAANzcnMBAgAAAAYEAAAACUVQU0c6NDMyNgs=
-</value>
+ <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>183, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>55</value>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <amm...@us...> - 2010-09-06 16:26:45
|
Revision: 4096
http://nasa-exp.svn.sourceforge.net/nasa-exp/?rev=4096&view=rev
Author: ammianus
Date: 2010-09-06 16:26:39 +0000 (Mon, 06 Sep 2010)
Log Message:
-----------
frank.evans: NOTES:
1. I made one change which is not related to WMS
PluginSDK::ImageStore::ConvertImage
When converting, only delete the original image if this is a DownloadableLayer.
Modified Paths:
--------------
trunk/WorldWind/PluginSDK/ImageStore.cs
Modified: trunk/WorldWind/PluginSDK/ImageStore.cs
===================================================================
--- trunk/WorldWind/PluginSDK/ImageStore.cs 2010-09-06 16:19:07 UTC (rev 4095)
+++ trunk/WorldWind/PluginSDK/ImageStore.cs 2010-09-06 16:26:39 UTC (rev 4096)
@@ -332,13 +332,16 @@
TextureLoader.Save(convertedPath, ImageFileFormat.Dds, texture );
// Delete the old file
- try
- {
- File.Delete(filePath);
- }
- catch
- {
- }
+ if (IsDownloadableLayer)
+ {
+ try
+ {
+ File.Delete(filePath);
+ }
+ catch
+ {
+ }
+ }
}
public Texture LoadFile(QuadTile qt)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <amm...@us...> - 2010-09-06 16:19:17
|
Revision: 4095
http://nasa-exp.svn.sourceforge.net/nasa-exp/?rev=4095&view=rev
Author: ammianus
Date: 2010-09-06 16:19:07 +0000 (Mon, 06 Sep 2010)
Log Message:
-----------
Added error handling for WMS Url that returned no Available Layers to the WMSBrowserNG.
Modified Paths:
--------------
branches/ammianus/WorldWind/WMSBrowserNG.cs
branches/ammianus/WorldWind/WMSBrowserNG.resx
Modified: branches/ammianus/WorldWind/WMSBrowserNG.cs
===================================================================
--- branches/ammianus/WorldWind/WMSBrowserNG.cs 2010-09-06 15:33:48 UTC (rev 4094)
+++ branches/ammianus/WorldWind/WMSBrowserNG.cs 2010-09-06 16:19:07 UTC (rev 4095)
@@ -107,15 +107,15 @@
this.pictureBoxProgressBar = new System.Windows.Forms.ProgressBar();
this.panelLower = new System.Windows.Forms.Panel();
this.panelContents = new System.Windows.Forms.Panel();
+ this.PasswordLabel = new System.Windows.Forms.Label();
+ this.PasswordTextBox = new System.Windows.Forms.TextBox();
+ this.UserNameLabel = new System.Windows.Forms.Label();
+ this.UsernameTextBox = new System.Windows.Forms.TextBox();
this.treeViewProgressBar = new System.Windows.Forms.ProgressBar();
this.label9 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.ConfLabel = new System.Windows.Forms.Label();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
- this.UsernameTextBox = new System.Windows.Forms.TextBox();
- this.UserNameLabel = new System.Windows.Forms.Label();
- this.PasswordLabel = new System.Windows.Forms.Label();
- this.PasswordTextBox = new System.Windows.Forms.TextBox();
this.xmlsaveGroupBox.SuspendLayout();
this.groupBox1.SuspendLayout();
this.panelLower.SuspendLayout();
@@ -126,10 +126,10 @@
//
this.treeOgcCaps.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(151)))), ((int)(((byte)(151)))), ((int)(((byte)(151)))));
this.treeOgcCaps.Credentials = null;
- this.treeOgcCaps.Location = new System.Drawing.Point(3, 206);
+ this.treeOgcCaps.Location = new System.Drawing.Point(2, 179);
this.treeOgcCaps.Name = "treeOgcCaps";
this.treeOgcCaps.Proxy = null;
- this.treeOgcCaps.Size = new System.Drawing.Size(610, 209);
+ this.treeOgcCaps.Size = new System.Drawing.Size(509, 181);
this.treeOgcCaps.TabIndex = 5;
this.toolTip1.SetToolTip(this.treeOgcCaps, "All data available from the requested WMS server. Highlight an item to show a pr" +
"eview image.");
@@ -144,9 +144,9 @@
"http://www.ga.gov.au/bin/getmap.pl?request=capabilities",
"http://www.geosignal.org/cgi-bin/wmsmap?",
"http://wms.globexplorer.com/gexservlets/wms?"});
- this.wmsGetCapstextbox.Location = new System.Drawing.Point(12, 158);
+ this.wmsGetCapstextbox.Location = new System.Drawing.Point(10, 137);
this.wmsGetCapstextbox.Name = "wmsGetCapstextbox";
- this.wmsGetCapstextbox.Size = new System.Drawing.Size(479, 24);
+ this.wmsGetCapstextbox.Size = new System.Drawing.Size(399, 21);
this.wmsGetCapstextbox.TabIndex = 20;
this.toolTip1.SetToolTip(this.wmsGetCapstextbox, "Enter a WMS server address or select one from the list. Note World Wnd only supp" +
"orts WGS:84 data.");
@@ -156,17 +156,17 @@
// label4
//
this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(12, 138);
+ this.label4.Location = new System.Drawing.Point(10, 120);
this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(65, 17);
+ this.label4.Size = new System.Drawing.Size(51, 13);
this.label4.TabIndex = 4;
this.label4.Text = "WMS url:";
//
// wmsbutton
//
- this.wmsbutton.Location = new System.Drawing.Point(498, 158);
+ this.wmsbutton.Location = new System.Drawing.Point(415, 137);
this.wmsbutton.Name = "wmsbutton";
- this.wmsbutton.Size = new System.Drawing.Size(109, 24);
+ this.wmsbutton.Size = new System.Drawing.Size(91, 21);
this.wmsbutton.TabIndex = 1;
this.wmsbutton.Text = "Get WMS Tree";
this.toolTip1.SetToolTip(this.wmsbutton, "Downloads the list of available imagery from the WMS server");
@@ -179,9 +179,9 @@
this.comboBox2.Items.AddRange(new object[] {
"png",
"jpeg"});
- this.comboBox2.Location = new System.Drawing.Point(235, 12);
+ this.comboBox2.Location = new System.Drawing.Point(196, 10);
this.comboBox2.Name = "comboBox2";
- this.comboBox2.Size = new System.Drawing.Size(85, 24);
+ this.comboBox2.Size = new System.Drawing.Size(71, 21);
this.comboBox2.TabIndex = 6;
this.comboBox2.Text = "jpeg";
this.toolTip1.SetToolTip(this.comboBox2, "Select image format to request, jpeg is best for imagery and png for vectors.");
@@ -190,9 +190,9 @@
// label5
//
this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(143, 15);
+ this.label5.Location = new System.Drawing.Point(119, 13);
this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(94, 17);
+ this.label5.Size = new System.Drawing.Size(71, 13);
this.label5.TabIndex = 7;
this.label5.Text = "Image Format";
//
@@ -207,9 +207,9 @@
this.xmlsaveGroupBox.Controls.Add(this.savewmsbutton);
this.xmlsaveGroupBox.Controls.Add(this.label2);
this.xmlsaveGroupBox.Enabled = false;
- this.xmlsaveGroupBox.Location = new System.Drawing.Point(25, 43);
+ this.xmlsaveGroupBox.Location = new System.Drawing.Point(21, 37);
this.xmlsaveGroupBox.Name = "xmlsaveGroupBox";
- this.xmlsaveGroupBox.Size = new System.Drawing.Size(322, 180);
+ this.xmlsaveGroupBox.Size = new System.Drawing.Size(268, 156);
this.xmlsaveGroupBox.TabIndex = 14;
this.xmlsaveGroupBox.TabStop = false;
this.xmlsaveGroupBox.Text = "Create layer";
@@ -218,9 +218,9 @@
//
this.label6.AutoSize = true;
this.label6.Enabled = false;
- this.label6.Location = new System.Drawing.Point(20, 53);
+ this.label6.Location = new System.Drawing.Point(17, 46);
this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(119, 17);
+ this.label6.Size = new System.Drawing.Size(89, 13);
this.label6.TabIndex = 13;
this.label6.Text = "Specify layer title:";
//
@@ -229,9 +229,9 @@
this.textBox3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(151)))), ((int)(((byte)(151)))), ((int)(((byte)(151)))));
this.textBox3.Enabled = false;
this.textBox3.ForeColor = System.Drawing.Color.White;
- this.textBox3.Location = new System.Drawing.Point(134, 50);
+ this.textBox3.Location = new System.Drawing.Point(112, 43);
this.textBox3.Name = "textBox3";
- this.textBox3.Size = new System.Drawing.Size(160, 22);
+ this.textBox3.Size = new System.Drawing.Size(133, 20);
this.textBox3.TabIndex = 12;
this.textBox3.Text = "WMS Layer";
this.toolTip1.SetToolTip(this.textBox3, "The name which will be shown in your layer manager for this data.");
@@ -242,9 +242,9 @@
this.checkBox1.AutoSize = true;
this.checkBox1.Checked = true;
this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked;
- this.checkBox1.Location = new System.Drawing.Point(73, 23);
+ this.checkBox1.Location = new System.Drawing.Point(61, 20);
this.checkBox1.Name = "checkBox1";
- this.checkBox1.Size = new System.Drawing.Size(239, 21);
+ this.checkBox1.Size = new System.Drawing.Size(179, 17);
this.checkBox1.TabIndex = 17;
this.checkBox1.Text = "Use default layer title from server";
this.checkBox1.UseVisualStyleBackColor = true;
@@ -253,9 +253,9 @@
// label7
//
this.label7.AutoSize = true;
- this.label7.Location = new System.Drawing.Point(70, 158);
+ this.label7.Location = new System.Drawing.Point(58, 137);
this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(213, 17);
+ this.label7.Size = new System.Drawing.Size(160, 13);
this.label7.TabIndex = 14;
this.label7.Text = "Warning: overwrites existing files";
this.label7.Click += new System.EventHandler(this.label7_Click);
@@ -263,9 +263,9 @@
// label3
//
this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(22, 98);
+ this.label3.Location = new System.Drawing.Point(18, 85);
this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(97, 17);
+ this.label3.Size = new System.Drawing.Size(74, 13);
this.label3.TabIndex = 11;
this.label3.Text = "XML filename:";
//
@@ -273,9 +273,9 @@
//
this.textBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(151)))), ((int)(((byte)(151)))), ((int)(((byte)(151)))));
this.textBox1.ForeColor = System.Drawing.Color.White;
- this.textBox1.Location = new System.Drawing.Point(118, 93);
+ this.textBox1.Location = new System.Drawing.Point(98, 81);
this.textBox1.Name = "textBox1";
- this.textBox1.Size = new System.Drawing.Size(159, 22);
+ this.textBox1.Size = new System.Drawing.Size(133, 20);
this.textBox1.TabIndex = 9;
this.textBox1.Text = "wms";
this.toolTip1.SetToolTip(this.textBox1, "The filename for the data, this will be stored in your Config\\PlanetName director" +
@@ -284,9 +284,9 @@
//
// savewmsbutton
//
- this.savewmsbutton.Location = new System.Drawing.Point(98, 123);
+ this.savewmsbutton.Location = new System.Drawing.Point(82, 107);
this.savewmsbutton.Name = "savewmsbutton";
- this.savewmsbutton.Size = new System.Drawing.Size(131, 32);
+ this.savewmsbutton.Size = new System.Drawing.Size(109, 27);
this.savewmsbutton.TabIndex = 5;
this.savewmsbutton.Text = "Save as XML";
this.toolTip1.SetToolTip(this.savewmsbutton, "Saves the file as XML and adds it to the layer manager");
@@ -296,9 +296,9 @@
// label2
//
this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(275, 98);
+ this.label2.Location = new System.Drawing.Point(229, 85);
this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(32, 17);
+ this.label2.Size = new System.Drawing.Size(25, 13);
this.label2.TabIndex = 10;
this.label2.Text = ".xml";
this.label2.Click += new System.EventHandler(this.label2_Click);
@@ -306,18 +306,18 @@
// groupBox1
//
this.groupBox1.Controls.Add(this.pictureBoxProgressBar);
- this.groupBox1.Location = new System.Drawing.Point(354, 7);
+ this.groupBox1.Location = new System.Drawing.Point(295, 6);
this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(257, 211);
+ this.groupBox1.Size = new System.Drawing.Size(214, 183);
this.groupBox1.TabIndex = 16;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Preview";
//
// pictureBoxProgressBar
//
- this.pictureBoxProgressBar.Location = new System.Drawing.Point(4, 196);
+ this.pictureBoxProgressBar.Location = new System.Drawing.Point(3, 170);
this.pictureBoxProgressBar.Name = "pictureBoxProgressBar";
- this.pictureBoxProgressBar.Size = new System.Drawing.Size(249, 20);
+ this.pictureBoxProgressBar.Size = new System.Drawing.Size(208, 17);
this.pictureBoxProgressBar.TabIndex = 16;
//
// panelLower
@@ -327,9 +327,9 @@
this.panelLower.Controls.Add(this.label5);
this.panelLower.Controls.Add(this.comboBox2);
this.panelLower.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.panelLower.Location = new System.Drawing.Point(0, 427);
+ this.panelLower.Location = new System.Drawing.Point(0, 459);
this.panelLower.Name = "panelLower";
- this.panelLower.Size = new System.Drawing.Size(702, 241);
+ this.panelLower.Size = new System.Drawing.Size(702, 209);
this.panelLower.TabIndex = 0;
this.panelLower.Paint += new System.Windows.Forms.PaintEventHandler(this.panelLower_Paint);
//
@@ -350,15 +350,48 @@
this.panelContents.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelContents.Location = new System.Drawing.Point(0, 0);
this.panelContents.Name = "panelContents";
- this.panelContents.Size = new System.Drawing.Size(702, 427);
+ this.panelContents.Size = new System.Drawing.Size(702, 459);
this.panelContents.TabIndex = 4;
//
+ // PasswordLabel
+ //
+ this.PasswordLabel.AutoSize = true;
+ this.PasswordLabel.Location = new System.Drawing.Point(100, 76);
+ this.PasswordLabel.Name = "PasswordLabel";
+ this.PasswordLabel.Size = new System.Drawing.Size(53, 13);
+ this.PasswordLabel.TabIndex = 24;
+ this.PasswordLabel.Text = "Password";
+ //
+ // PasswordTextBox
+ //
+ this.PasswordTextBox.Location = new System.Drawing.Point(102, 94);
+ this.PasswordTextBox.Name = "PasswordTextBox";
+ this.PasswordTextBox.PasswordChar = '*';
+ this.PasswordTextBox.Size = new System.Drawing.Size(84, 20);
+ this.PasswordTextBox.TabIndex = 23;
+ //
+ // UserNameLabel
+ //
+ this.UserNameLabel.AutoSize = true;
+ this.UserNameLabel.Location = new System.Drawing.Point(7, 76);
+ this.UserNameLabel.Name = "UserNameLabel";
+ this.UserNameLabel.Size = new System.Drawing.Size(55, 13);
+ this.UserNameLabel.TabIndex = 22;
+ this.UserNameLabel.Text = "Username";
+ //
+ // UsernameTextBox
+ //
+ this.UsernameTextBox.Location = new System.Drawing.Point(10, 94);
+ this.UsernameTextBox.Name = "UsernameTextBox";
+ this.UsernameTextBox.Size = new System.Drawing.Size(83, 20);
+ this.UsernameTextBox.TabIndex = 21;
+ //
// treeViewProgressBar
//
this.treeViewProgressBar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(151)))), ((int)(((byte)(151)))), ((int)(((byte)(151)))));
- this.treeViewProgressBar.Location = new System.Drawing.Point(358, 188);
+ this.treeViewProgressBar.Location = new System.Drawing.Point(298, 163);
this.treeViewProgressBar.Name = "treeViewProgressBar";
- this.treeViewProgressBar.Size = new System.Drawing.Size(249, 12);
+ this.treeViewProgressBar.Size = new System.Drawing.Size(208, 10);
this.treeViewProgressBar.TabIndex = 17;
this.toolTip1.SetToolTip(this.treeViewProgressBar, "Loading .... Please Wait.");
this.treeViewProgressBar.Visible = false;
@@ -366,9 +399,9 @@
// label9
//
this.label9.AutoSize = true;
- this.label9.Location = new System.Drawing.Point(14, 31);
+ this.label9.Location = new System.Drawing.Point(12, 27);
this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(516, 17);
+ this.label9.Size = new System.Drawing.Size(394, 13);
this.label9.TabIndex = 19;
this.label9.Text = "\x95 Fill in options and click \"Save as XML\" to add the all of the layers to World W" +
"ind";
@@ -376,9 +409,9 @@
// label8
//
this.label8.AutoSize = true;
- this.label8.Location = new System.Drawing.Point(14, 10);
+ this.label8.Location = new System.Drawing.Point(12, 9);
this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(620, 17);
+ this.label8.Size = new System.Drawing.Size(473, 13);
this.label8.TabIndex = 18;
this.label8.Text = "\x95 Enter a WMS url in the url bar below and click \"Get WMS Tree\" to see the conten" +
"ts of the server";
@@ -386,9 +419,9 @@
// ConfLabel
//
this.ConfLabel.AutoSize = true;
- this.ConfLabel.Location = new System.Drawing.Point(3, 188);
+ this.ConfLabel.Location = new System.Drawing.Point(2, 163);
this.ConfLabel.Name = "ConfLabel";
- this.ConfLabel.Size = new System.Drawing.Size(112, 17);
+ this.ConfLabel.Size = new System.Drawing.Size(84, 13);
this.ConfLabel.TabIndex = 4;
this.ConfLabel.Text = "Available Layers";
//
@@ -396,49 +429,16 @@
//
this.toolTip1.Popup += new System.Windows.Forms.PopupEventHandler(this.toolTip1_Popup);
//
- // UsernameTextBox
- //
- this.UsernameTextBox.Location = new System.Drawing.Point(12, 108);
- this.UsernameTextBox.Name = "UsernameTextBox";
- this.UsernameTextBox.Size = new System.Drawing.Size(100, 22);
- this.UsernameTextBox.TabIndex = 21;
- //
- // UserNameLabel
- //
- this.UserNameLabel.AutoSize = true;
- this.UserNameLabel.Location = new System.Drawing.Point(9, 88);
- this.UserNameLabel.Name = "UserNameLabel";
- this.UserNameLabel.Size = new System.Drawing.Size(73, 17);
- this.UserNameLabel.TabIndex = 22;
- this.UserNameLabel.Text = "Username";
- //
- // PasswordLabel
- //
- this.PasswordLabel.AutoSize = true;
- this.PasswordLabel.Location = new System.Drawing.Point(120, 88);
- this.PasswordLabel.Name = "PasswordLabel";
- this.PasswordLabel.Size = new System.Drawing.Size(69, 17);
- this.PasswordLabel.TabIndex = 24;
- this.PasswordLabel.Text = "Password";
- //
- // PasswordTextBox
- //
- this.PasswordTextBox.Location = new System.Drawing.Point(123, 108);
- this.PasswordTextBox.Name = "PasswordTextBox";
- this.PasswordTextBox.PasswordChar = '*';
- this.PasswordTextBox.Size = new System.Drawing.Size(100, 22);
- this.PasswordTextBox.TabIndex = 23;
- //
// WMSBrowserNG
//
- this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
+ this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(111)))), ((int)(((byte)(111)))), ((int)(((byte)(111)))));
this.ClientSize = new System.Drawing.Size(702, 668);
this.Controls.Add(this.panelContents);
this.Controls.Add(this.panelLower);
this.ForeColor = System.Drawing.Color.White;
this.KeyPreview = true;
- this.MinimumSize = new System.Drawing.Size(605, 557);
+ this.MinimumSize = new System.Drawing.Size(504, 483);
this.Name = "WMSBrowserNG";
this.Text = "WMS Importer";
this.toolTip1.SetToolTip(this, "Import WMS imagery to a World Wind layer.");
@@ -465,7 +465,7 @@
private void button1_Click(object sender, EventArgs e)
{
- treeOgcCaps.Nodes.Clear();
+ treeOgcCaps.Nodes.Clear();
treeOgcCaps.URL = wmsGetCapstextbox.Text;
//if (treeOgcCaps.URL.Contains("seyeqweb01dul"))
// treeOgcCaps.Credentials = new NetworkCredential("admin", "admin");
@@ -685,12 +685,22 @@
private void treeOgcCaps_OperationDone(object sender, EventArgs e)
{
- TreeNode tn = treeOgcCaps.Nodes[0];
- LayerItem li = tn.Tag as LayerItem;
+ //if the URL is not good, it can crash WW, handle exception better
+ if (treeOgcCaps.Nodes != null && treeOgcCaps.Nodes.Count > 0)
+ {
+ TreeNode tn = treeOgcCaps.Nodes[0];
+ LayerItem li = tn.Tag as LayerItem;
- textBox3.Text = li.Title;
- xmlsaveGroupBox.Enabled = true;
-
+ textBox3.Text = li.Title;
+ xmlsaveGroupBox.Enabled = true;
+ }
+ else
+ {
+ String logMsg = "WMS url did not return any valid layers " + wmsGetCapstextbox.Text;
+ Log.Write(Log.Levels.Error, "WBNG", logMsg);
+ MessageBox.Show("WMS url did not return any valid layers.");
+ //treeOgcCaps.Enabled = false;
+ }
treeViewProgressBar.Visible = false;
}
Modified: branches/ammianus/WorldWind/WMSBrowserNG.resx
===================================================================
--- branches/ammianus/WorldWind/WMSBrowserNG.resx 2010-09-06 15:33:48 UTC (rev 4094)
+++ branches/ammianus/WorldWind/WMSBrowserNG.resx 2010-09-06 16:19:07 UTC (rev 4095)
@@ -123,9 +123,6 @@
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>183, 17</value>
</metadata>
- <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>183, 17</value>
- </metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>55</value>
</metadata>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <amm...@us...> - 2010-09-06 15:33:55
|
Revision: 4094
http://nasa-exp.svn.sourceforge.net/nasa-exp/?rev=4094&view=rev
Author: ammianus
Date: 2010-09-06 15:33:48 +0000 (Mon, 06 Sep 2010)
Log Message:
-----------
frank.evans: support authenticated WMS changes, WMSBrowser updates NOT READY
WMSBrowserNG.cs
WMSLayerAccessor.cs
ConfigurationLoader.cs
WebDownload.cs
Modified Paths:
--------------
branches/ammianus/WorldWind/WMSBrowser.cs
branches/ammianus/WorldWind/WMSBrowserNG.cs
branches/ammianus/WorldWind/WMSBrowserNG.resx
Modified: branches/ammianus/WorldWind/WMSBrowser.cs
===================================================================
--- branches/ammianus/WorldWind/WMSBrowser.cs 2010-08-22 11:39:11 UTC (rev 4093)
+++ branches/ammianus/WorldWind/WMSBrowser.cs 2010-09-06 15:33:48 UTC (rev 4094)
@@ -951,7 +951,9 @@
{
string url = curServer.ServerUrl.Value + (curServer.ServerUrl.Value.IndexOf("?") > 0 ? "&request=GetCapabilities&service=WMS&version=" + curServer.Version.Value : "?request=GetCapabilities&service=WMS&version=" + curServer.Version.Value);
using (WebDownload download = new WebDownload(url))
+ {
download.DownloadFile(xmlPath);
+ }
}
this.wmsList = new WMSList(curServer.Name.Value, curServer.ServerUrl.Value, xmlPath, curServer.Version.Value);
Modified: branches/ammianus/WorldWind/WMSBrowserNG.cs
===================================================================
--- branches/ammianus/WorldWind/WMSBrowserNG.cs 2010-08-22 11:39:11 UTC (rev 4093)
+++ branches/ammianus/WorldWind/WMSBrowserNG.cs 2010-09-06 15:33:48 UTC (rev 4094)
@@ -52,7 +52,7 @@
private Button savewmsbutton;
private Label label2;
private GroupBox groupBox1;
- private CarbonTools.Controls.PictureBoxOGC pictureBoxOGC1;
+ //private CarbonTools.Controls.PictureBoxOGC pictureBoxOGC1;
private Panel panelLower;
private Panel panelContents;
private Label ConfLabel;
@@ -62,6 +62,10 @@
private Label label8;
private ToolTip toolTip1;
private IContainer components;
+ private Label PasswordLabel;
+ private TextBox PasswordTextBox;
+ private Label UserNameLabel;
+ private TextBox UsernameTextBox;
private CarbonTools.Controls.TreeViewOGCCapabilities treeOgcCaps;
@@ -100,7 +104,6 @@
this.savewmsbutton = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.pictureBoxOGC1 = new CarbonTools.Controls.PictureBoxOGC();
this.pictureBoxProgressBar = new System.Windows.Forms.ProgressBar();
this.panelLower = new System.Windows.Forms.Panel();
this.panelContents = new System.Windows.Forms.Panel();
@@ -109,9 +112,12 @@
this.label8 = new System.Windows.Forms.Label();
this.ConfLabel = new System.Windows.Forms.Label();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
+ this.UsernameTextBox = new System.Windows.Forms.TextBox();
+ this.UserNameLabel = new System.Windows.Forms.Label();
+ this.PasswordLabel = new System.Windows.Forms.Label();
+ this.PasswordTextBox = new System.Windows.Forms.TextBox();
this.xmlsaveGroupBox.SuspendLayout();
this.groupBox1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.pictureBoxOGC1)).BeginInit();
this.panelLower.SuspendLayout();
this.panelContents.SuspendLayout();
this.SuspendLayout();
@@ -120,10 +126,10 @@
//
this.treeOgcCaps.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(151)))), ((int)(((byte)(151)))), ((int)(((byte)(151)))));
this.treeOgcCaps.Credentials = null;
- this.treeOgcCaps.Location = new System.Drawing.Point(3, 107);
+ this.treeOgcCaps.Location = new System.Drawing.Point(3, 206);
this.treeOgcCaps.Name = "treeOgcCaps";
this.treeOgcCaps.Proxy = null;
- this.treeOgcCaps.Size = new System.Drawing.Size(509, 181);
+ this.treeOgcCaps.Size = new System.Drawing.Size(610, 209);
this.treeOgcCaps.TabIndex = 5;
this.toolTip1.SetToolTip(this.treeOgcCaps, "All data available from the requested WMS server. Highlight an item to show a pr" +
"eview image.");
@@ -138,9 +144,9 @@
"http://www.ga.gov.au/bin/getmap.pl?request=capabilities",
"http://www.geosignal.org/cgi-bin/wmsmap?",
"http://wms.globexplorer.com/gexservlets/wms?"});
- this.wmsGetCapstextbox.Location = new System.Drawing.Point(3, 62);
+ this.wmsGetCapstextbox.Location = new System.Drawing.Point(12, 158);
this.wmsGetCapstextbox.Name = "wmsGetCapstextbox";
- this.wmsGetCapstextbox.Size = new System.Drawing.Size(407, 21);
+ this.wmsGetCapstextbox.Size = new System.Drawing.Size(479, 24);
this.wmsGetCapstextbox.TabIndex = 20;
this.toolTip1.SetToolTip(this.wmsGetCapstextbox, "Enter a WMS server address or select one from the list. Note World Wnd only supp" +
"orts WGS:84 data.");
@@ -150,17 +156,17 @@
// label4
//
this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(7, 46);
+ this.label4.Location = new System.Drawing.Point(12, 138);
this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(79, 13);
+ this.label4.Size = new System.Drawing.Size(65, 17);
this.label4.TabIndex = 4;
- this.label4.Text = "Enter WMS url:";
+ this.label4.Text = "WMS url:";
//
// wmsbutton
//
- this.wmsbutton.Location = new System.Drawing.Point(416, 62);
+ this.wmsbutton.Location = new System.Drawing.Point(498, 158);
this.wmsbutton.Name = "wmsbutton";
- this.wmsbutton.Size = new System.Drawing.Size(91, 21);
+ this.wmsbutton.Size = new System.Drawing.Size(109, 24);
this.wmsbutton.TabIndex = 1;
this.wmsbutton.Text = "Get WMS Tree";
this.toolTip1.SetToolTip(this.wmsbutton, "Downloads the list of available imagery from the WMS server");
@@ -173,9 +179,9 @@
this.comboBox2.Items.AddRange(new object[] {
"png",
"jpeg"});
- this.comboBox2.Location = new System.Drawing.Point(196, 10);
+ this.comboBox2.Location = new System.Drawing.Point(235, 12);
this.comboBox2.Name = "comboBox2";
- this.comboBox2.Size = new System.Drawing.Size(71, 21);
+ this.comboBox2.Size = new System.Drawing.Size(85, 24);
this.comboBox2.TabIndex = 6;
this.comboBox2.Text = "jpeg";
this.toolTip1.SetToolTip(this.comboBox2, "Select image format to request, jpeg is best for imagery and png for vectors.");
@@ -184,9 +190,9 @@
// label5
//
this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(119, 13);
+ this.label5.Location = new System.Drawing.Point(143, 15);
this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(71, 13);
+ this.label5.Size = new System.Drawing.Size(94, 17);
this.label5.TabIndex = 7;
this.label5.Text = "Image Format";
//
@@ -201,9 +207,9 @@
this.xmlsaveGroupBox.Controls.Add(this.savewmsbutton);
this.xmlsaveGroupBox.Controls.Add(this.label2);
this.xmlsaveGroupBox.Enabled = false;
- this.xmlsaveGroupBox.Location = new System.Drawing.Point(21, 37);
+ this.xmlsaveGroupBox.Location = new System.Drawing.Point(25, 43);
this.xmlsaveGroupBox.Name = "xmlsaveGroupBox";
- this.xmlsaveGroupBox.Size = new System.Drawing.Size(268, 156);
+ this.xmlsaveGroupBox.Size = new System.Drawing.Size(322, 180);
this.xmlsaveGroupBox.TabIndex = 14;
this.xmlsaveGroupBox.TabStop = false;
this.xmlsaveGroupBox.Text = "Create layer";
@@ -212,9 +218,9 @@
//
this.label6.AutoSize = true;
this.label6.Enabled = false;
- this.label6.Location = new System.Drawing.Point(17, 46);
+ this.label6.Location = new System.Drawing.Point(20, 53);
this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(89, 13);
+ this.label6.Size = new System.Drawing.Size(119, 17);
this.label6.TabIndex = 13;
this.label6.Text = "Specify layer title:";
//
@@ -223,9 +229,9 @@
this.textBox3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(151)))), ((int)(((byte)(151)))), ((int)(((byte)(151)))));
this.textBox3.Enabled = false;
this.textBox3.ForeColor = System.Drawing.Color.White;
- this.textBox3.Location = new System.Drawing.Point(112, 43);
+ this.textBox3.Location = new System.Drawing.Point(134, 50);
this.textBox3.Name = "textBox3";
- this.textBox3.Size = new System.Drawing.Size(133, 20);
+ this.textBox3.Size = new System.Drawing.Size(160, 22);
this.textBox3.TabIndex = 12;
this.textBox3.Text = "WMS Layer";
this.toolTip1.SetToolTip(this.textBox3, "The name which will be shown in your layer manager for this data.");
@@ -236,9 +242,9 @@
this.checkBox1.AutoSize = true;
this.checkBox1.Checked = true;
this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked;
- this.checkBox1.Location = new System.Drawing.Point(61, 20);
+ this.checkBox1.Location = new System.Drawing.Point(73, 23);
this.checkBox1.Name = "checkBox1";
- this.checkBox1.Size = new System.Drawing.Size(179, 17);
+ this.checkBox1.Size = new System.Drawing.Size(239, 21);
this.checkBox1.TabIndex = 17;
this.checkBox1.Text = "Use default layer title from server";
this.checkBox1.UseVisualStyleBackColor = true;
@@ -247,9 +253,9 @@
// label7
//
this.label7.AutoSize = true;
- this.label7.Location = new System.Drawing.Point(58, 137);
+ this.label7.Location = new System.Drawing.Point(70, 158);
this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(160, 13);
+ this.label7.Size = new System.Drawing.Size(213, 17);
this.label7.TabIndex = 14;
this.label7.Text = "Warning: overwrites existing files";
this.label7.Click += new System.EventHandler(this.label7_Click);
@@ -257,9 +263,9 @@
// label3
//
this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(18, 85);
+ this.label3.Location = new System.Drawing.Point(22, 98);
this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(74, 13);
+ this.label3.Size = new System.Drawing.Size(97, 17);
this.label3.TabIndex = 11;
this.label3.Text = "XML filename:";
//
@@ -267,9 +273,9 @@
//
this.textBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(151)))), ((int)(((byte)(151)))), ((int)(((byte)(151)))));
this.textBox1.ForeColor = System.Drawing.Color.White;
- this.textBox1.Location = new System.Drawing.Point(98, 81);
+ this.textBox1.Location = new System.Drawing.Point(118, 93);
this.textBox1.Name = "textBox1";
- this.textBox1.Size = new System.Drawing.Size(133, 20);
+ this.textBox1.Size = new System.Drawing.Size(159, 22);
this.textBox1.TabIndex = 9;
this.textBox1.Text = "wms";
this.toolTip1.SetToolTip(this.textBox1, "The filename for the data, this will be stored in your Config\\PlanetName director" +
@@ -278,9 +284,9 @@
//
// savewmsbutton
//
- this.savewmsbutton.Location = new System.Drawing.Point(82, 107);
+ this.savewmsbutton.Location = new System.Drawing.Point(98, 123);
this.savewmsbutton.Name = "savewmsbutton";
- this.savewmsbutton.Size = new System.Drawing.Size(109, 27);
+ this.savewmsbutton.Size = new System.Drawing.Size(131, 32);
this.savewmsbutton.TabIndex = 5;
this.savewmsbutton.Text = "Save as XML";
this.toolTip1.SetToolTip(this.savewmsbutton, "Saves the file as XML and adds it to the layer manager");
@@ -290,50 +296,28 @@
// label2
//
this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(229, 85);
+ this.label2.Location = new System.Drawing.Point(275, 98);
this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(25, 13);
+ this.label2.Size = new System.Drawing.Size(32, 17);
this.label2.TabIndex = 10;
this.label2.Text = ".xml";
this.label2.Click += new System.EventHandler(this.label2_Click);
//
// groupBox1
//
- this.groupBox1.Controls.Add(this.pictureBoxOGC1);
this.groupBox1.Controls.Add(this.pictureBoxProgressBar);
- this.groupBox1.Location = new System.Drawing.Point(295, 6);
+ this.groupBox1.Location = new System.Drawing.Point(354, 7);
this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(214, 183);
+ this.groupBox1.Size = new System.Drawing.Size(257, 211);
this.groupBox1.TabIndex = 16;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Preview";
//
- // pictureBoxOGC1
- //
- this.pictureBoxOGC1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(151)))), ((int)(((byte)(151)))), ((int)(((byte)(151)))));
- this.pictureBoxOGC1.Credentials = null;
- this.pictureBoxOGC1.ImageFormat = "";
- this.pictureBoxOGC1.LayerName = "";
- this.pictureBoxOGC1.LayerNamespace = "";
- this.pictureBoxOGC1.LayerStyle = "";
- this.pictureBoxOGC1.Location = new System.Drawing.Point(3, 19);
- this.pictureBoxOGC1.MapToolRectColor = System.Drawing.Color.Red;
- this.pictureBoxOGC1.Name = "pictureBoxOGC1";
- this.pictureBoxOGC1.Proxy = null;
- this.pictureBoxOGC1.Size = new System.Drawing.Size(208, 148);
- this.pictureBoxOGC1.StyleBrushColor = System.Drawing.Color.White;
- this.pictureBoxOGC1.StylePenColor = System.Drawing.Color.Black;
- this.pictureBoxOGC1.TabIndex = 15;
- this.pictureBoxOGC1.TabStop = false;
- this.toolTip1.SetToolTip(this.pictureBoxOGC1, "overeview image from WMS server.");
- this.pictureBoxOGC1.URL = "";
- this.pictureBoxOGC1.ZoomEffectFrames = 0;
- //
// pictureBoxProgressBar
//
- this.pictureBoxProgressBar.Location = new System.Drawing.Point(3, 170);
+ this.pictureBoxProgressBar.Location = new System.Drawing.Point(4, 196);
this.pictureBoxProgressBar.Name = "pictureBoxProgressBar";
- this.pictureBoxProgressBar.Size = new System.Drawing.Size(208, 17);
+ this.pictureBoxProgressBar.Size = new System.Drawing.Size(249, 20);
this.pictureBoxProgressBar.TabIndex = 16;
//
// panelLower
@@ -343,14 +327,18 @@
this.panelLower.Controls.Add(this.label5);
this.panelLower.Controls.Add(this.comboBox2);
this.panelLower.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.panelLower.Location = new System.Drawing.Point(0, 294);
+ this.panelLower.Location = new System.Drawing.Point(0, 427);
this.panelLower.Name = "panelLower";
- this.panelLower.Size = new System.Drawing.Size(529, 209);
+ this.panelLower.Size = new System.Drawing.Size(702, 241);
this.panelLower.TabIndex = 0;
this.panelLower.Paint += new System.Windows.Forms.PaintEventHandler(this.panelLower_Paint);
//
// panelContents
//
+ this.panelContents.Controls.Add(this.PasswordLabel);
+ this.panelContents.Controls.Add(this.PasswordTextBox);
+ this.panelContents.Controls.Add(this.UserNameLabel);
+ this.panelContents.Controls.Add(this.UsernameTextBox);
this.panelContents.Controls.Add(this.treeViewProgressBar);
this.panelContents.Controls.Add(this.treeOgcCaps);
this.panelContents.Controls.Add(this.label9);
@@ -362,15 +350,15 @@
this.panelContents.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelContents.Location = new System.Drawing.Point(0, 0);
this.panelContents.Name = "panelContents";
- this.panelContents.Size = new System.Drawing.Size(529, 294);
+ this.panelContents.Size = new System.Drawing.Size(702, 427);
this.panelContents.TabIndex = 4;
//
// treeViewProgressBar
//
this.treeViewProgressBar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(151)))), ((int)(((byte)(151)))), ((int)(((byte)(151)))));
- this.treeViewProgressBar.Location = new System.Drawing.Point(299, 91);
+ this.treeViewProgressBar.Location = new System.Drawing.Point(358, 188);
this.treeViewProgressBar.Name = "treeViewProgressBar";
- this.treeViewProgressBar.Size = new System.Drawing.Size(208, 10);
+ this.treeViewProgressBar.Size = new System.Drawing.Size(249, 12);
this.treeViewProgressBar.TabIndex = 17;
this.toolTip1.SetToolTip(this.treeViewProgressBar, "Loading .... Please Wait.");
this.treeViewProgressBar.Visible = false;
@@ -378,9 +366,9 @@
// label9
//
this.label9.AutoSize = true;
- this.label9.Location = new System.Drawing.Point(12, 27);
+ this.label9.Location = new System.Drawing.Point(14, 31);
this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(394, 13);
+ this.label9.Size = new System.Drawing.Size(516, 17);
this.label9.TabIndex = 19;
this.label9.Text = "\x95 Fill in options and click \"Save as XML\" to add the all of the layers to World W" +
"ind";
@@ -388,9 +376,9 @@
// label8
//
this.label8.AutoSize = true;
- this.label8.Location = new System.Drawing.Point(12, 9);
+ this.label8.Location = new System.Drawing.Point(14, 10);
this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(473, 13);
+ this.label8.Size = new System.Drawing.Size(620, 17);
this.label8.TabIndex = 18;
this.label8.Text = "\x95 Enter a WMS url in the url bar below and click \"Get WMS Tree\" to see the conten" +
"ts of the server";
@@ -398,9 +386,9 @@
// ConfLabel
//
this.ConfLabel.AutoSize = true;
- this.ConfLabel.Location = new System.Drawing.Point(3, 91);
+ this.ConfLabel.Location = new System.Drawing.Point(3, 188);
this.ConfLabel.Name = "ConfLabel";
- this.ConfLabel.Size = new System.Drawing.Size(84, 13);
+ this.ConfLabel.Size = new System.Drawing.Size(112, 17);
this.ConfLabel.TabIndex = 4;
this.ConfLabel.Text = "Available Layers";
//
@@ -408,16 +396,49 @@
//
this.toolTip1.Popup += new System.Windows.Forms.PopupEventHandler(this.toolTip1_Popup);
//
+ // UsernameTextBox
+ //
+ this.UsernameTextBox.Location = new System.Drawing.Point(12, 108);
+ this.UsernameTextBox.Name = "UsernameTextBox";
+ this.UsernameTextBox.Size = new System.Drawing.Size(100, 22);
+ this.UsernameTextBox.TabIndex = 21;
+ //
+ // UserNameLabel
+ //
+ this.UserNameLabel.AutoSize = true;
+ this.UserNameLabel.Location = new System.Drawing.Point(9, 88);
+ this.UserNameLabel.Name = "UserNameLabel";
+ this.UserNameLabel.Size = new System.Drawing.Size(73, 17);
+ this.UserNameLabel.TabIndex = 22;
+ this.UserNameLabel.Text = "Username";
+ //
+ // PasswordLabel
+ //
+ this.PasswordLabel.AutoSize = true;
+ this.PasswordLabel.Location = new System.Drawing.Point(120, 88);
+ this.PasswordLabel.Name = "PasswordLabel";
+ this.PasswordLabel.Size = new System.Drawing.Size(69, 17);
+ this.PasswordLabel.TabIndex = 24;
+ this.PasswordLabel.Text = "Password";
+ //
+ // PasswordTextBox
+ //
+ this.PasswordTextBox.Location = new System.Drawing.Point(123, 108);
+ this.PasswordTextBox.Name = "PasswordTextBox";
+ this.PasswordTextBox.PasswordChar = '*';
+ this.PasswordTextBox.Size = new System.Drawing.Size(100, 22);
+ this.PasswordTextBox.TabIndex = 23;
+ //
// WMSBrowserNG
//
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+ this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(111)))), ((int)(((byte)(111)))), ((int)(((byte)(111)))));
- this.ClientSize = new System.Drawing.Size(529, 503);
+ this.ClientSize = new System.Drawing.Size(702, 668);
this.Controls.Add(this.panelContents);
this.Controls.Add(this.panelLower);
this.ForeColor = System.Drawing.Color.White;
this.KeyPreview = true;
- this.MinimumSize = new System.Drawing.Size(504, 483);
+ this.MinimumSize = new System.Drawing.Size(605, 557);
this.Name = "WMSBrowserNG";
this.Text = "WMS Importer";
this.toolTip1.SetToolTip(this, "Import WMS imagery to a World Wind layer.");
@@ -425,7 +446,6 @@
this.xmlsaveGroupBox.ResumeLayout(false);
this.xmlsaveGroupBox.PerformLayout();
this.groupBox1.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.pictureBoxOGC1)).EndInit();
this.panelLower.ResumeLayout(false);
this.panelLower.PerformLayout();
this.panelContents.ResumeLayout(false);
@@ -445,13 +465,33 @@
private void button1_Click(object sender, EventArgs e)
{
-
treeOgcCaps.Nodes.Clear();
treeOgcCaps.URL = wmsGetCapstextbox.Text;
+ //if (treeOgcCaps.URL.Contains("seyeqweb01dul"))
+ // treeOgcCaps.Credentials = new NetworkCredential("admin", "admin");
+ if (UsernameTextBox.Text != "")
+ {
+ NetworkCredential creds = new NetworkCredential(UsernameTextBox.Text, PasswordTextBox.Text);
+ //NetworkCredential basicCred = creds.GetCredential(new Uri(wmsGetCapstextbox.Text), "Basic");
+ treeOgcCaps.Credentials = creds;
+ }
+
+ //treeOgcCaps.Version = "1.3.0";
+
+ //treeOgcCaps.Proxy = ProxyHelper.DetermineProxyForUrl(treeOgcCaps.URL, true, true, "http://192.168.25.13/proxy.pac", "", "");
+
+ //treeOgcCaps.ServiceType = OGCServiceTypes.WMS;
+ //CarbonTools.Core.OGCCapabilities.DataOGCCapabilities foo = new DataOGCCapabilities();
+ //CarbonTools.Core.WMS.SourceWMS swms = new CarbonTools.Core.WMS.SourceWMS();
+ //SourceOGCCapabilities bar = new SourceOGCCapabilities();
+
treeViewProgressBar.Visible = true;
- treeOgcCaps.GetCapabilities();
+ treeOgcCaps.GetCapabilities();
+ //treeOgcCaps.node
+
+
System.Windows.Forms.Timer treeViewTimer = new System.Windows.Forms.Timer();
treeViewTimer.Enabled = true;
treeViewTimer.Interval = 50;
@@ -469,11 +509,10 @@
private void savewmsbutton_Click(object sender, EventArgs e)
{
- string wmslayerset = "<LayerSet Name=\"" + textBox3.Text + "\" ShowOnlyOneLayer=\"false\" ShowAtStartup=\"true\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"LayerSet.xsd\">\n";
- wmslayerset += ParseNodeChildren(treeOgcCaps.Nodes[0]);
-
+ string wmslayerset = "<LayerSet Name=\"" + textBox3.Text + "\" ShowOnlyOneLayer=\"false\" ShowAtStartup=\"true\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"LayerSet.xsd\">\n";
+ wmslayerset += ParseNodeChildren(treeOgcCaps.Nodes[0], UsernameTextBox.Text, PasswordTextBox.Text);
wmslayerset += "</LayerSet>";
XmlDocument doc = new XmlDocument();
@@ -497,7 +536,7 @@
}
- private string ConvertLayerToWMS(LayerItem layer)
+ private string ConvertLayerToWMS(LayerItem layer, string Username, string Password)
{
//TODO: Add layer abstracts from wms as <Description> in xml
@@ -509,6 +548,8 @@
string imageType = comboBox2.Text;
skeleton = ReadSkeleton(FILE_NAME);
+ skeleton = skeleton.Replace(@"$USERNAME", Username);
+ skeleton = skeleton.Replace(@"$PASSWORD", Password);
skeleton = skeleton.Replace(@"$NAME", ConvertToXMLEntities(layer.Title));
skeleton = skeleton.Replace(@"$NBB", layer.LLBoundingBox.MaxY.ToString(CultureInfo.InvariantCulture));
skeleton = skeleton.Replace(@"$SBB", layer.LLBoundingBox.MinY.ToString(CultureInfo.InvariantCulture));
@@ -522,11 +563,11 @@
if (wmsGetCapstextbox.Text.ToLowerInvariant().Contains("map="))
{
mapfilepath = Regex.Match(wmsGetCapstextbox.Text, "map=.*\\.map").Value;
- skeleton = skeleton.Replace(@"$LAYERNAME", layer.Name + @"&TRANSPARENT=TRUE&BGCOLOR=0xFF00FF&" + mapfilepath);
+ skeleton = skeleton.Replace(@"$LAYERNAME", layer.Name + @"&TRANSPARENT=TRUE&BGCOLOR=0x000000&" + mapfilepath);
}
else
{
- skeleton = skeleton.Replace(@"$LAYERNAME", layer.Name + @"&TRANSPARENT=TRUE&BGCOLOR=0xFF00FF");
+ skeleton = skeleton.Replace(@"$LAYERNAME", layer.Name + @"&TRANSPARENT=TRUE&BGCOLOR=0x000000");
}
skeleton = skeleton.Replace(@"$SERVER", ConvertToXMLEntities(wmsGetMap));
@@ -534,10 +575,9 @@
skeleton = skeleton.Replace(@"$IMAGETYPE", ConvertToXMLEntities(imageType));
return skeleton;
+ }
- }
-
private static string ReadSkeleton(string FILE_NAME)
{
string skeleton = null;
@@ -611,17 +651,17 @@
// Set map view paramerters
- pictureBoxOGC1.URL = treeOgcCaps.URL;
- pictureBoxOGC1.ServiceType = OGCServiceTypes.WMS;
- pictureBoxOGC1.LayerName = layer.Name; // Set layer name
- pictureBoxProgressBar.Value = 0;
+ //pictureBoxOGC1.URL = treeOgcCaps.URL;
+ //pictureBoxOGC1.ServiceType = OGCServiceTypes.WMS;
+ //pictureBoxOGC1.LayerName = layer.Name; // Set layer name
+ //pictureBoxProgressBar.Value = 0;
// Update image
- pictureBoxOGC1.GetImage();
+ //pictureBoxOGC1.GetImage();
- System.Windows.Forms.Timer pictureBoxTimer = new System.Windows.Forms.Timer();
- pictureBoxTimer.Enabled = true;
- pictureBoxTimer.Interval = 50;
- pictureBoxTimer.Tick += new EventHandler(pictureBoxTimer_Tick);
+ //System.Windows.Forms.Timer pictureBoxTimer = new System.Windows.Forms.Timer();
+ //pictureBoxTimer.Enabled = true;
+ //pictureBoxTimer.Interval = 50;
+ //pictureBoxTimer.Tick += new EventHandler(pictureBoxTimer_Tick);
}
@@ -654,7 +694,11 @@
treeViewProgressBar.Visible = false;
}
- private string ParseNodeChildren(TreeNode node)
+
+
+
+
+ private string ParseNodeChildren(TreeNode node, string Username, string Password)
{
string returned = null;
@@ -670,7 +714,7 @@
foreach (TreeNode subNode in node.Nodes)
{
- returned += ParseNodeChildren(subNode);
+ returned += ParseNodeChildren(subNode, Username, Password);
}
if (node.Level != 0)
@@ -684,16 +728,16 @@
{
LayerItem li = node.Tag as LayerItem;
- returned += ConvertLayerToWMS(li);
+ returned += ConvertLayerToWMS(li, Username, Password);
return returned;
}
}
- private void pictureBoxTimer_Tick(object sender, EventArgs e)
- {
- pictureBoxProgressBar.Value = pictureBoxOGC1.GetProgress(100);
- }
+ //private void pictureBoxTimer_Tick(object sender, EventArgs e)
+ //{
+ // pictureBoxProgressBar.Value = pictureBoxOGC1.GetProgress(100);
+ //}
private void treeViewTimer_Tick(object sender, EventArgs e)
{
Modified: branches/ammianus/WorldWind/WMSBrowserNG.resx
===================================================================
--- branches/ammianus/WorldWind/WMSBrowserNG.resx 2010-08-22 11:39:11 UTC (rev 4093)
+++ branches/ammianus/WorldWind/WMSBrowserNG.resx 2010-09-06 15:33:48 UTC (rev 4094)
@@ -123,16 +123,8 @@
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>183, 17</value>
</metadata>
- <metadata name="pictureBoxOGC1.BBox" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>
- AAEAAAD/////AQAAAAAAAAAMAgAAAFVDYXJib25Ub29scy5Db3JlLCBWZXJzaW9uPTIuMS4xMDAuMCwg
- Q3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1lMTcwNjJiZmIyMTRiOTBjBQEAAAAhQ2FyYm9u
- VG9vbHMuQ29yZS5CYXNlLkJvdW5kaW5nQm94BwAAAARtaW54BG1pbnkEbWluegRtYXh4BG1heHkEbWF4
- egNjcnMAAAAAAAAEBgYGBgYGL0NhcmJvblRvb2xzLkNvcmUuQmFzZS5Db29yZGluYXRlUmVmZXJlbmNl
- U3lzdGVtAgAAAAIAAAAAAAAAAIBmwAAAAAAAgFbAAAAAAAAA+P8AAAAAAIBmQAAAAAAAgFZAAAAAAAAA
- +P8JAwAAAAUDAAAAL0NhcmJvblRvb2xzLkNvcmUuQmFzZS5Db29yZGluYXRlUmVmZXJlbmNlU3lzdGVt
- AQAAAANzcnMBAgAAAAYEAAAACUVQU0c6NDMyNgs=
-</value>
+ <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>183, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>55</value>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <amm...@us...> - 2010-08-22 11:39:18
|
Revision: 4093
http://nasa-exp.svn.sourceforge.net/nasa-exp/?rev=4093&view=rev
Author: ammianus
Date: 2010-08-22 11:39:11 +0000 (Sun, 22 Aug 2010)
Log Message:
-----------
frank.evans: support authenticated WMS changes
WMSBrowserNG.cs
WMSLayerAccessor.cs
ConfigurationLoader.cs
WebDownload.cs
Modified Paths:
--------------
branches/ammianus/PluginSDK/ConfigurationLoader.cs
branches/ammianus/PluginSDK/Renderable/GeoSpatialDownloadRequest.cs
branches/ammianus/PluginSDK/WMSLayerAccessor.cs
branches/ammianus/WebDownload/WebDownload.cs
Modified: branches/ammianus/PluginSDK/ConfigurationLoader.cs
===================================================================
--- branches/ammianus/PluginSDK/ConfigurationLoader.cs 2010-08-22 11:35:22 UTC (rev 4092)
+++ branches/ammianus/PluginSDK/ConfigurationLoader.cs 2010-08-22 11:39:11 UTC (rev 4093)
@@ -790,8 +790,13 @@
wmsLayerStore.Version = getInnerTextFromFirstChild(wmsAccessorIter.Current.Select("Version"));
wmsLayerStore.WMSLayerName = getInnerTextFromFirstChild(wmsAccessorIter.Current.Select("WMSLayerName"));
+
string username = getInnerTextFromFirstChild(wmsAccessorIter.Current.Select("Username"));
string password = getInnerTextFromFirstChild(wmsAccessorIter.Current.Select("Password"));
+
+ wmsLayerStore.Username = username;
+ wmsLayerStore.Password = password;
+
string wmsStyleName = getInnerTextFromFirstChild(wmsAccessorIter.Current.Select("WMSLayerStyle"));
string serverLogoPath = getInnerTextFromFirstChild(wmsAccessorIter.Current.Select("ServerLogoFilePath"));
string opacityString = getInnerTextFromFirstChild(wmsAccessorIter.Current.Select("Opacity"));
Modified: branches/ammianus/PluginSDK/Renderable/GeoSpatialDownloadRequest.cs
===================================================================
--- branches/ammianus/PluginSDK/Renderable/GeoSpatialDownloadRequest.cs 2010-08-22 11:35:22 UTC (rev 4092)
+++ branches/ammianus/PluginSDK/Renderable/GeoSpatialDownloadRequest.cs 2010-08-22 11:39:11 UTC (rev 4093)
@@ -24,6 +24,7 @@
m_url = downloadUrl;
m_localFilePath = localFilePath;
m_imageStore = imageStore;
+
}
/// <summary>
@@ -183,14 +184,25 @@
public virtual void StartDownload()
{
+
+
+
// Offline check
if (World.Settings.WorkOffline)
return;
Log.Write(Log.Levels.Debug, "GSDR", "Starting download for " + m_url);
// Log.Write(Log.Levels.Debug, "GSDR", "to be stored in "+this.m_imageStore.GetLocalPath(QuadTile));
+
+ WorldWind.Net.Wms.WmsImageStore wmsImageStore = m_imageStore as WorldWind.Net.Wms.WmsImageStore;
+ System.Net.NetworkCredential downloadCredentials = null;
+
+ if (wmsImageStore != null)
+ downloadCredentials = new System.Net.NetworkCredential(wmsImageStore.Username, wmsImageStore.Password);
+
QuadTile.IsDownloadingImage = true;
- download = new WebDownload(m_url);
+ download = new WebDownload(m_url, downloadCredentials);
+
download.DownloadType = DownloadType.Wms;
download.SavedFilePath = m_localFilePath + ".tmp";
download.ProgressCallback += new DownloadProgressHandler(UpdateProgress);
Modified: branches/ammianus/PluginSDK/WMSLayerAccessor.cs
===================================================================
--- branches/ammianus/PluginSDK/WMSLayerAccessor.cs 2010-08-22 11:35:22 UTC (rev 4092)
+++ branches/ammianus/PluginSDK/WMSLayerAccessor.cs 2010-08-22 11:39:11 UTC (rev 4093)
@@ -16,6 +16,8 @@
string m_wmsLayerStyle;
string m_imageFormat;
string m_version;
+ string m_username;
+ string m_password;
int m_textureSizePixels = 512;
#endregion
@@ -42,6 +44,32 @@
}
}
+
+ public virtual string Username
+ {
+ get
+ {
+ return m_username;
+ }
+ set
+ {
+ m_username = value;
+ }
+ }
+
+
+ public virtual string Password
+ {
+ get
+ {
+ return m_password;
+ }
+ set
+ {
+ m_password = value;
+ }
+ }
+
public virtual string WMSLayerName
{
get
@@ -149,6 +177,14 @@
XmlNode tileServiceNode = worldDoc.CreateElement("WMSAccessor");
+ XmlNode UsernameNode = worldDoc.CreateElement("Username");
+ UsernameNode.AppendChild(worldDoc.CreateTextNode(Username));
+ tileServiceNode.AppendChild(UsernameNode);
+
+ XmlNode PasswordNode = worldDoc.CreateElement("Password");
+ PasswordNode.AppendChild(worldDoc.CreateTextNode(Password));
+ tileServiceNode.AppendChild(PasswordNode);
+
XmlNode imageFormatNode = worldDoc.CreateElement("ImageFormat");
imageFormatNode.AppendChild(worldDoc.CreateTextNode(ImageFormat));
tileServiceNode.AppendChild(imageFormatNode);
Modified: branches/ammianus/WebDownload/WebDownload.cs
===================================================================
--- branches/ammianus/WebDownload/WebDownload.cs 2010-08-22 11:35:22 UTC (rev 4092)
+++ branches/ammianus/WebDownload/WebDownload.cs 2010-08-22 11:39:11 UTC (rev 4093)
@@ -54,6 +54,9 @@
public string SavedFilePath;
public bool IsComplete;
+ public NetworkCredential RequestCredentials;
+ public int RequestTimeout = 0;
+
/// <summary>
/// Called when data is being received.
/// Note that totalBytes will be zero if the server does not respond with content-length.
@@ -112,6 +115,14 @@
this.Url = url;
}
+ public WebDownload(string url, NetworkCredential credentials)
+ {
+ this.Url = url;
+ this.RequestCredentials = credentials;
+ }
+
+
+
/// <summary>
/// Initializes a new instance of the <see cref="T:WorldWind.Net.WebDownload"/> class.
/// </summary>
@@ -404,6 +415,13 @@
// Create the request object.
request = (HttpWebRequest)WebRequest.Create(Url);
request.UserAgent = UserAgent;
+
+ request.Credentials = RequestCredentials;
+ if (RequestTimeout != 0)
+ request.Timeout = RequestTimeout;
+
+
+
@@ -440,6 +458,7 @@
bool VerifyServerCertificate(Object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
{
+
if (sslPolicyErrors == SslPolicyErrors.None) return true;
foreach (X509ChainStatus s in chain.ChainStatus)
@@ -481,6 +500,10 @@
Log.Write(Log.Levels.Debug, "Starting sync download for " + this.Url);
+ //Cookie foo = new Cookie();
+ //request.CookieContainer.Add(foo);
+
+ //request.co
Debug.Assert(Url.StartsWith("http"));
DownloadStartTime = DateTime.Now;
try
@@ -1027,10 +1050,14 @@
//no - let these errors also rise up to the request to handle (ie a 404 will not get requested again)
throw Exception;
}
+ else if (response == null)
+ {
+ return;
+ }
else if (response.StatusCode == System.Net.HttpStatusCode.PartialContent)
{
//treat 206 Partial Content as an Exception
- WebException partialDownloadException = new WebException("Partial Download Response",null,WebExceptionStatus.ReceiveFailure,response);
+ WebException partialDownloadException = new WebException("Partial Download Response", null, WebExceptionStatus.ReceiveFailure, response);
throw partialDownloadException;
}
else if (response.StatusCode == System.Net.HttpStatusCode.OK && response.ContentLength == 0)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <amm...@us...> - 2010-08-22 11:35:28
|
Revision: 4092
http://nasa-exp.svn.sourceforge.net/nasa-exp/?rev=4092&view=rev
Author: ammianus
Date: 2010-08-22 11:35:22 +0000 (Sun, 22 Aug 2010)
Log Message:
-----------
frank.evans: NOTES:
1. I made one change which is not related to WMS
PluginSDK::ImageStore::ConvertImage
When converting, only delete the original image if this is a DownloadableLayer.
Modified Paths:
--------------
branches/ammianus/PluginSDK/ImageStore.cs
Modified: branches/ammianus/PluginSDK/ImageStore.cs
===================================================================
--- branches/ammianus/PluginSDK/ImageStore.cs 2010-03-26 16:57:12 UTC (rev 4091)
+++ branches/ammianus/PluginSDK/ImageStore.cs 2010-08-22 11:35:22 UTC (rev 4092)
@@ -332,13 +332,16 @@
TextureLoader.Save(convertedPath, ImageFileFormat.Dds, texture );
// Delete the old file
- try
- {
- File.Delete(filePath);
- }
- catch
- {
- }
+ if (IsDownloadableLayer)
+ {
+ try
+ {
+ File.Delete(filePath);
+ }
+ catch
+ {
+ }
+ }
}
public Texture LoadFile(QuadTile qt)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2010-03-26 16:57:19
|
Revision: 4091
http://nasa-exp.svn.sourceforge.net/nasa-exp/?rev=4091&view=rev
Author: martinws
Date: 2010-03-26 16:57:12 +0000 (Fri, 26 Mar 2010)
Log Message:
-----------
gfx runtime fixes
Modified Paths:
--------------
branches/slimdx/PluginSDK/Menu.cs
branches/slimdx/PluginSDK/QuadTileSet.cs
branches/slimdx/WorldWind/Stars3D.cs
Modified: branches/slimdx/PluginSDK/Menu.cs
===================================================================
--- branches/slimdx/PluginSDK/Menu.cs 2010-03-26 14:45:06 UTC (rev 4090)
+++ branches/slimdx/PluginSDK/Menu.cs 2010-03-26 16:57:12 UTC (rev 4091)
@@ -708,11 +708,16 @@
// Set the Direct3D viewport to match the layer manager client area
// to clip the text to the window when scrolling
+ if (ClientWidth < 1 || ClientHeight < 1)
+ return;
+
Viewport lmClientAreaViewPort = new Viewport();
lmClientAreaViewPort.X = ClientLeft;
lmClientAreaViewPort.Y = ClientTop;
lmClientAreaViewPort.Width = ClientWidth;
lmClientAreaViewPort.Height = ClientHeight;
+ lmClientAreaViewPort.MinZ = 0;
+ lmClientAreaViewPort.MaxZ = 1;
Viewport defaultViewPort = drawArgs.device.Viewport;
drawArgs.device.Viewport = lmClientAreaViewPort;
for(int i = 0; i < _itemList.Count; i++)
Modified: branches/slimdx/PluginSDK/QuadTileSet.cs
===================================================================
--- branches/slimdx/PluginSDK/QuadTileSet.cs 2010-03-26 14:45:06 UTC (rev 4090)
+++ branches/slimdx/PluginSDK/QuadTileSet.cs 2010-03-26 16:57:12 UTC (rev 4091)
@@ -1396,9 +1396,9 @@
// Also, why on earth are we drawing things with GDI this way?
using (MemoryStream ms = new MemoryStream(2*mid * 2*mid * 3))
{
- i.Save(ms, System.Drawing.Imaging.ImageFormat.MemoryBmp);
- Texture texture = Texture.FromStream(device, ms);
- return texture;
+ i.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
+ ms.Seek(0, SeekOrigin.Begin);
+ return Texture.FromStream(device, ms);
}
}
}
Modified: branches/slimdx/WorldWind/Stars3D.cs
===================================================================
--- branches/slimdx/WorldWind/Stars3D.cs 2010-03-26 14:45:06 UTC (rev 4090)
+++ branches/slimdx/WorldWind/Stars3D.cs 2010-03-26 16:57:12 UTC (rev 4091)
@@ -308,8 +308,9 @@
// Get the original mesh's vertex buffer.
int [] ranks = new int[1];
ranks[0] = FlareMesh.VertexCount;
+
DataStream flareMeshStream = FlareMesh.LockVertexBuffer(LockFlags.None);
- CustomVertex.PositionColored[] arr = flareMeshStream.ReadRange<CustomVertex.PositionColored>(FlareMesh.VertexCount);
+ CustomVertex.PositionTextured[] arr = flareMeshStream.ReadRange<CustomVertex.PositionTextured>(FlareMesh.VertexCount);
FlareMesh.UnlockVertexBuffer();
//System.Array arr = FlareMesh.VertexBuffer.Lock(0, typeof(CustomVertex.PositionTextured),LockFlags.None,ranks);
@@ -376,50 +377,48 @@
idx++;
// if flare add 4 vertex to mesh
- if(VM < FlareMag)
- {
- double flareFactor = sphereRadius * 5 / drawArgs.device.Viewport.Width;
- double l = (VM + 1.5) / (FlareMag + 1.5) * flareFactor; // Size of half flare texture in meter
- // Calculate perp1 and perp2 so they form a plane perpendicular to the star vector and crossing earth center
- Vector3 perp1 = Vector3.Cross( v, new Vector3(1,1,1) );
- Vector3 perp2 = Vector3.Cross( perp1, v );
- perp1.Normalize();
- perp2.Normalize();
+ if (VM < FlareMag)
+ {
+ double flareFactor = sphereRadius * 5 / drawArgs.device.Viewport.Width;
+ double l = (VM + 1.5) / (FlareMag + 1.5) * flareFactor; // Size of half flare texture in meter
+ // Calculate perp1 and perp2 so they form a plane perpendicular to the star vector and crossing earth center
+ Vector3 perp1 = Vector3.Cross(v, new Vector3(1, 1, 1));
+ Vector3 perp2 = Vector3.Cross(perp1, v);
+ perp1.Normalize();
+ perp2.Normalize();
//perp1.Scale((float)l);
//perp2.Scale((float)l);
- Vector3 v1;
+ Vector3 v1;
- //v = MathEngine.SphericalToCartesian( latitude + l, longitude - l, sphereRadius);
- v1 = v + perp1 - perp2;
- pnt = new CustomVertex.PositionTextured();
- pnt.Position = new Vector3( v1.X, v1.Y, v1.Z );
- pnt.Tu = 0;
- pnt.Tv = 0;
- arr.SetValue(pnt,vertIndex++);
- //v = MathEngine.SphericalToCartesian( latitude + l, longitude + l, sphereRadius);
- v1 = v + perp1 + perp2;
- pnt = new CustomVertex.PositionTextured();
- pnt.Position = new Vector3( v1.X, v1.Y, v1.Z );
- pnt.Tu = 1;
- pnt.Tv = 0;
- arr.SetValue(pnt,vertIndex++);
- //v = MathEngine.SphericalToCartesian( latitude - l, longitude - l, sphereRadius);
- v1 = v - perp1 - perp2;
- pnt = new CustomVertex.PositionTextured();
- pnt.Position = new Vector3( v1.X, v1.Y, v1.Z );
- pnt.Tu = 0;
- pnt.Tv = 1;
- arr.SetValue(pnt,vertIndex++);
- //v = MathEngine.SphericalToCartesian( latitude - l, longitude + l, sphereRadius);
- v1 = v - perp1 + perp2;
- pnt = new CustomVertex.PositionTextured();
- pnt.Position = new Vector3( v1.X, v1.Y, v1.Z );
- pnt.Tu = 1;
- pnt.Tv = 1;
- arr.SetValue(pnt,vertIndex++);
- }
-
-
+ //v = MathEngine.SphericalToCartesian( latitude + l, longitude - l, sphereRadius);
+ v1 = v + perp1 - perp2;
+ pnt = new CustomVertex.PositionTextured();
+ pnt.Position = new Vector3(v1.X, v1.Y, v1.Z);
+ pnt.Tu = 0;
+ pnt.Tv = 0;
+ arr[vertIndex++] = pnt;
+ //v = MathEngine.SphericalToCartesian( latitude + l, longitude + l, sphereRadius);
+ v1 = v + perp1 + perp2;
+ pnt = new CustomVertex.PositionTextured();
+ pnt.Position = new Vector3(v1.X, v1.Y, v1.Z);
+ pnt.Tu = 1;
+ pnt.Tv = 0;
+ arr[vertIndex++] = pnt;
+ //v = MathEngine.SphericalToCartesian( latitude - l, longitude - l, sphereRadius);
+ v1 = v - perp1 - perp2;
+ pnt = new CustomVertex.PositionTextured();
+ pnt.Position = new Vector3(v1.X, v1.Y, v1.Z);
+ pnt.Tu = 0;
+ pnt.Tv = 1;
+ arr[vertIndex++] = pnt;
+ //v = MathEngine.SphericalToCartesian( latitude - l, longitude + l, sphereRadius);
+ v1 = v - perp1 + perp2;
+ pnt = new CustomVertex.PositionTextured();
+ pnt.Position = new Vector3(v1.X, v1.Y, v1.Z);
+ pnt.Tu = 1;
+ pnt.Tv = 1;
+ arr[vertIndex++] = pnt;
+ }
}
if(line.Substring(0, 3) == "---") isData = 1;
}
@@ -433,7 +432,6 @@
StarListVB.Unlock();
// Set flare mesh indices
- FlareMesh.VertexBuffer.Unlock();
ranks[0] = numFaces * 3;
DataStream flareMeshIdxStream = FlareMesh.LockIndexBuffer(LockFlags.None);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2010-03-26 14:35:19
|
Revision: 4089
http://nasa-exp.svn.sourceforge.net/nasa-exp/?rev=4089&view=rev
Author: martinws
Date: 2010-03-26 14:35:07 +0000 (Fri, 26 Mar 2010)
Log Message:
-----------
Added Paths:
-----------
branches/slimdx/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <amm...@us...> - 2010-02-28 18:57:36
|
Revision: 4088
http://nasa-exp.svn.sourceforge.net/nasa-exp/?rev=4088&view=rev
Author: ammianus
Date: 2010-02-28 18:57:27 +0000 (Sun, 28 Feb 2010)
Log Message:
-----------
Java servlet used to test the WW.NET download code changes. Deployed to Apache Tomcat 6.0, JDK 1.6. Has hard-coded values in the code, you will need to have your own cache pack for images to serve and configure WW layers to point to your server rather than WW server.
Added Paths:
-----------
branches/ammianus/TomcatTileServer/
branches/ammianus/TomcatTileServer/.classpath
branches/ammianus/TomcatTileServer/.project
branches/ammianus/TomcatTileServer/.settings/
branches/ammianus/TomcatTileServer/.settings/.jsdtscope
branches/ammianus/TomcatTileServer/.settings/org.eclipse.jdt.core.prefs
branches/ammianus/TomcatTileServer/.settings/org.eclipse.jst.common.project.facet.core.prefs
branches/ammianus/TomcatTileServer/.settings/org.eclipse.wst.common.component
branches/ammianus/TomcatTileServer/.settings/org.eclipse.wst.common.project.facet.core.xml
branches/ammianus/TomcatTileServer/.settings/org.eclipse.wst.jsdt.ui.superType.container
branches/ammianus/TomcatTileServer/.settings/org.eclipse.wst.jsdt.ui.superType.name
branches/ammianus/TomcatTileServer/WebContent/
branches/ammianus/TomcatTileServer/WebContent/META-INF/
branches/ammianus/TomcatTileServer/WebContent/META-INF/MANIFEST.MF
branches/ammianus/TomcatTileServer/WebContent/WEB-INF/
branches/ammianus/TomcatTileServer/WebContent/WEB-INF/lib/
branches/ammianus/TomcatTileServer/WebContent/WEB-INF/web.xml
branches/ammianus/TomcatTileServer/WebContent/index.jsp
branches/ammianus/TomcatTileServer/build/
branches/ammianus/TomcatTileServer/build/classes/
branches/ammianus/TomcatTileServer/build/classes/org/
branches/ammianus/TomcatTileServer/build/classes/org/wwc/
branches/ammianus/TomcatTileServer/build/classes/org/wwc/ammianus/
branches/ammianus/TomcatTileServer/build/classes/org/wwc/ammianus/tomcat/
branches/ammianus/TomcatTileServer/build/classes/org/wwc/ammianus/tomcat/tileserver/
branches/ammianus/TomcatTileServer/build/classes/org/wwc/ammianus/tomcat/tileserver/TileRequestHandler.class
branches/ammianus/TomcatTileServer/src/
branches/ammianus/TomcatTileServer/src/org/
branches/ammianus/TomcatTileServer/src/org/wwc/
branches/ammianus/TomcatTileServer/src/org/wwc/ammianus/
branches/ammianus/TomcatTileServer/src/org/wwc/ammianus/tomcat/
branches/ammianus/TomcatTileServer/src/org/wwc/ammianus/tomcat/tileserver/
branches/ammianus/TomcatTileServer/src/org/wwc/ammianus/tomcat/tileserver/TileRequestHandler.java
Added: branches/ammianus/TomcatTileServer/.classpath
===================================================================
--- branches/ammianus/TomcatTileServer/.classpath (rev 0)
+++ branches/ammianus/TomcatTileServer/.classpath 2010-02-28 18:57:27 UTC (rev 4088)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_12"/>
+ <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.0"/>
+ <classpathentry kind="output" path="build/classes"/>
+</classpath>
Added: branches/ammianus/TomcatTileServer/.project
===================================================================
--- branches/ammianus/TomcatTileServer/.project (rev 0)
+++ branches/ammianus/TomcatTileServer/.project 2010-02-28 18:57:27 UTC (rev 4088)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>TomcatTileServer</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+</projectDescription>
Added: branches/ammianus/TomcatTileServer/.settings/.jsdtscope
===================================================================
--- branches/ammianus/TomcatTileServer/.settings/.jsdtscope (rev 0)
+++ branches/ammianus/TomcatTileServer/.settings/.jsdtscope 2010-02-28 18:57:27 UTC (rev 4088)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
Added: branches/ammianus/TomcatTileServer/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- branches/ammianus/TomcatTileServer/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ branches/ammianus/TomcatTileServer/.settings/org.eclipse.jdt.core.prefs 2010-02-28 18:57:27 UTC (rev 4088)
@@ -0,0 +1,7 @@
+#Wed Jul 01 19:39:10 KST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Added: branches/ammianus/TomcatTileServer/.settings/org.eclipse.jst.common.project.facet.core.prefs
===================================================================
--- branches/ammianus/TomcatTileServer/.settings/org.eclipse.jst.common.project.facet.core.prefs (rev 0)
+++ branches/ammianus/TomcatTileServer/.settings/org.eclipse.jst.common.project.facet.core.prefs 2010-02-28 18:57:27 UTC (rev 4088)
@@ -0,0 +1,3 @@
+#Sun Jul 26 12:41:12 EDT 2009
+classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER\:\:org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType\:\:jdk1.6.0_12/owners=jst.java\:6.0
+eclipse.preferences.version=1
Added: branches/ammianus/TomcatTileServer/.settings/org.eclipse.wst.common.component
===================================================================
--- branches/ammianus/TomcatTileServer/.settings/org.eclipse.wst.common.component (rev 0)
+++ branches/ammianus/TomcatTileServer/.settings/org.eclipse.wst.common.component 2010-02-28 18:57:27 UTC (rev 4088)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="TomcatTileServer">
+ <wb-resource deploy-path="/" source-path="/WebContent"/>
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
+ <property name="java-output-path"/>
+ <property name="context-root" value="TomcatTileServer"/>
+ </wb-module>
+</project-modules>
Added: branches/ammianus/TomcatTileServer/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- branches/ammianus/TomcatTileServer/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ branches/ammianus/TomcatTileServer/.settings/org.eclipse.wst.common.project.facet.core.xml 2010-02-28 18:57:27 UTC (rev 4088)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="jst.web"/>
+ <fixed facet="jst.java"/>
+ <installed facet="jst.java" version="6.0"/>
+ <installed facet="jst.web" version="2.5"/>
+ <installed facet="wst.jsdt.web" version="1.0"/>
+</faceted-project>
Added: branches/ammianus/TomcatTileServer/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
--- branches/ammianus/TomcatTileServer/.settings/org.eclipse.wst.jsdt.ui.superType.container (rev 0)
+++ branches/ammianus/TomcatTileServer/.settings/org.eclipse.wst.jsdt.ui.superType.container 2010-02-28 18:57:27 UTC (rev 4088)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added: branches/ammianus/TomcatTileServer/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
--- branches/ammianus/TomcatTileServer/.settings/org.eclipse.wst.jsdt.ui.superType.name (rev 0)
+++ branches/ammianus/TomcatTileServer/.settings/org.eclipse.wst.jsdt.ui.superType.name 2010-02-28 18:57:27 UTC (rev 4088)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Added: branches/ammianus/TomcatTileServer/WebContent/META-INF/MANIFEST.MF
===================================================================
--- branches/ammianus/TomcatTileServer/WebContent/META-INF/MANIFEST.MF (rev 0)
+++ branches/ammianus/TomcatTileServer/WebContent/META-INF/MANIFEST.MF 2010-02-28 18:57:27 UTC (rev 4088)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: branches/ammianus/TomcatTileServer/WebContent/WEB-INF/web.xml
===================================================================
--- branches/ammianus/TomcatTileServer/WebContent/WEB-INF/web.xml (rev 0)
+++ branches/ammianus/TomcatTileServer/WebContent/WEB-INF/web.xml 2010-02-28 18:57:27 UTC (rev 4088)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
+ <display-name>TomcatTileServer</display-name>
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ <welcome-file>default.html</welcome-file>
+ <welcome-file>default.htm</welcome-file>
+ <welcome-file>default.jsp</welcome-file>
+ </welcome-file-list>
+ <servlet>
+ <description></description>
+ <display-name>TileRequestHandler</display-name>
+ <servlet-name>TileRequestHandler</servlet-name>
+ <servlet-class>org.wwc.ammianus.tomcat.tileserver.TileRequestHandler</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>TileRequestHandler</servlet-name>
+ <url-pattern>/TileRequestHandler</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Added: branches/ammianus/TomcatTileServer/WebContent/index.jsp
===================================================================
--- branches/ammianus/TomcatTileServer/WebContent/index.jsp (rev 0)
+++ branches/ammianus/TomcatTileServer/WebContent/index.jsp 2010-02-28 18:57:27 UTC (rev 4088)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+ pageEncoding="ISO-8859-1"%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Tomcat Tile Server</title>
+</head>
+<body>
+<h2>Tomcat Tile Server</h1>
+<p>WorldWind.NET content server for image tiles</p>
+<p>Author: <a href="http://librixxxi.blogspot.com/">Ammianus</a></p>
+<p><b>Usage:</b><br/>
+Enter in a URL in this format
+http://{servername}:{port}/TileRequestHandler?T=geocover2000&L=0&X=48&Y=21
+</p>
+<p><b>Current available data sets:</b><br/>
+GeoCover2000 (Layers: 0 - 6)<br/>
+<p>
+</body>
+</html>
\ No newline at end of file
Added: branches/ammianus/TomcatTileServer/build/classes/org/wwc/ammianus/tomcat/tileserver/TileRequestHandler.class
===================================================================
(Binary files differ)
Property changes on: branches/ammianus/TomcatTileServer/build/classes/org/wwc/ammianus/tomcat/tileserver/TileRequestHandler.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/ammianus/TomcatTileServer/src/org/wwc/ammianus/tomcat/tileserver/TileRequestHandler.java
===================================================================
--- branches/ammianus/TomcatTileServer/src/org/wwc/ammianus/tomcat/tileserver/TileRequestHandler.java (rev 0)
+++ branches/ammianus/TomcatTileServer/src/org/wwc/ammianus/tomcat/tileserver/TileRequestHandler.java 2010-02-28 18:57:27 UTC (rev 4088)
@@ -0,0 +1,158 @@
+package org.wwc.ammianus.tomcat.tileserver;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.text.DecimalFormat;
+import java.util.HashMap;
+
+import javax.servlet.ServletException;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * <p>This servlet handles requests from the World Wind.NET application and returns
+ * tile images or error codes as appropriate. This was a port to Java of a ASP.NET file posted
+ * at <a>http://worldwindcentral.com/wiki/Data_serving_scripts</a></p>
+ *
+ * @author ammianus
+ * @version 0.1
+ *
+ *
+ */
+public class TileRequestHandler extends HttpServlet {
+
+ /**
+ * Generated by Eclipse
+ */
+ private static final long serialVersionUID = -6596187549520730077L;
+ /**
+ * settings Map which theoretically could be extended for any layer used in WW
+ * for each layer, use the <DataSetName></DataSetName> tag value from @Images.xml file
+ * create three map entries <DataSetName>, <DataSetName>_EXT, <DataSetName>_MIME
+ */
+ private HashMap<String, String> _settings;
+
+ private int _requestNumber;
+
+ /**
+ * @see HttpServlet#HttpServlet()
+ */
+ public TileRequestHandler() {
+ super();
+ //use these setting which theoretically could be extended for any layer used in WW
+ //for each layer, use the <DataSetName></DataSetName> tag value from @Images.xml file
+ //create three map entries <DataSetName>, <DataSetName>_EXT, <DataSetName>_MIME
+ _settings = new HashMap<String,String>();
+ _settings.put("geocover2000", "C:\\Users\\Public\\WorldWindCache\\Cache\\Earth\\Images\\NASA Landsat Imagery\\Geocover 2000");
+ _settings.put("geocover2000_EXT", ".jpg");
+ _settings.put("geocover2000_MIME", "image/jpeg");
+
+ _requestNumber = 0;
+ }
+
+ /**
+ * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
+ */
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ //increment counter
+ _requestNumber++;
+
+ //Un-comment this to test whether WW handles 503 return code with Retry-After header
+ //
+ //first request we will send an error with a retry-after header
+ //
+ /*if(_requestNumber == 1){
+ response.setStatus(503);
+ //this appears to be case insensitive for WorldWind, I just picked a random retry-after period
+ response.setHeader("retry-after", "38");
+ System.out.println(_requestNumber+":Response: 503, with retry-after: 38");
+ return;
+ }*/
+
+ try{
+
+
+ //column
+ int X = Integer.parseInt(request.getParameter("X").toString());
+ //row
+ int Y = Integer.parseInt(request.getParameter("Y").toString());
+ //level
+ int L = Integer.parseInt(request.getParameter("L").toString());
+ //DataSet name
+ String T = request.getParameter("T").toString(); //T = Dataset in WorldWind parlance
+
+
+ //Un-comment this to test whether WW handles 500 return code
+ //
+ //if(T.equals("geocover2000")){
+ // throw new Exception("Force return of 500 - Server Error");
+ //}
+
+ //Arguments are in this format URL sent from world wind
+ //e.g. http://localhost:8080/TomcatTileServer/TileRequestHandler?T=geocover2000&L=0&X=47&Y=21
+ String filePath = _settings.get(T);//WebConfigurationManager.AppSettings[T];
+
+ String fileExt = _settings.get(T + "_EXT");
+ if(L < 3){
+ DecimalFormat df = new DecimalFormat("0000");
+ filePath += "\\"+L + "\\" + df.format(Y) + "\\" + df.format(Y) + "_" + df.format(X) + fileExt;
+ }else{
+ filePath += "\\level"+(L+1)+fileExt;
+ }
+ //request.get
+ System.out.println(_requestNumber+":Requested File: "+filePath);
+ File file = new File(filePath);
+
+ //if file (image for requested tile) is not found on server, return 404
+ if (!file.exists())
+ {
+ response.sendError(HttpServletResponse.SC_NOT_FOUND, "Not Found");
+ }
+ else
+ {
+ //set content length to file size
+ response.setContentLength((int) file.length());
+ //get mime type for this layer
+ response.setContentType(_settings.get(T + "_MIME"));
+ //get the output stream for the response, this will have the file written to it
+ ServletOutputStream stream = response.getOutputStream();
+
+ //read the file contents and write them to the outputstream
+ FileInputStream fis = new FileInputStream(file);
+ byte[] bytes = new byte[1024];
+ int counter = 0;
+ while(counter < file.length()){
+ fis.read(bytes);
+ counter += 1024;
+ stream.write(bytes);
+ }
+ fis.close();
+ stream.flush();
+ stream.close();
+
+ //done with response
+ }
+ }catch(Exception e){
+ //uncaught Exception return 500 error
+ response.sendError(500,e.getMessage());
+ System.out.println(_requestNumber+":Response: send 500 error");
+ }
+
+ }
+
+ /**
+ * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
+ */
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ // TODO Auto-generated method stub
+ }
+
+ /*
+ * Just some fun stuff for my local implementation
+ */
+
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <amm...@us...> - 2009-12-05 13:27:12
|
Revision: 4087
http://nasa-exp.svn.sourceforge.net/nasa-exp/?rev=4087&view=rev
Author: ammianus
Date: 2009-12-05 13:27:03 +0000 (Sat, 05 Dec 2009)
Log Message:
-----------
Fiveofoh's fix for Issue #5 WWC (.NET) should be changed to accept data from the cache WITHOUT the leading "00".
http://worldwindcentral.com/wiki/1_4_1_Issues
Modified Paths:
--------------
trunk/WorldWind/PluginSDK/ImageStore.cs
Modified: trunk/WorldWind/PluginSDK/ImageStore.cs
===================================================================
--- trunk/WorldWind/PluginSDK/ImageStore.cs 2009-12-05 13:24:58 UTC (rev 4086)
+++ trunk/WorldWind/PluginSDK/ImageStore.cs 2009-12-05 13:27:03 UTC (rev 4087)
@@ -213,51 +213,79 @@
#endregion
- public virtual string GetLocalPath(QuadTile qt)
+ /// <summary>
+ /// Returns a path to be used for local storage of the tile
+ /// Checks through various places before just assinging to cache, in this order.
+ /// If it finds a tile in any of these places, it immediately returns the path.
+ /// 1. The "Data" directory (if existent), under its folder structure
+ /// 2. If the QTS doesn't have a cache directory, it just returns the m_duplicateTexturePath
+ /// 3. If it has a cache directory, first with the default file extension, then checks for others
+ /// 4. If not found in any of these, it simply constructs the path
+ /// from cache directory and default extension, and returns that path
+ ///
+ /// This method also checks for tiles in the old, pre-1.4.1 cache structure if it can't find it
+ /// in the new WWJ format. If it can't find it in the old structure, it returns a WWJ-style
+ /// path to store a new tile in.
+ /// </summary>
+ public virtual string GetLocalPath(QuadTile qt)
{
if(qt.Level >= m_levelCount)
throw new ArgumentException(string.Format("Level {0} not available.",
qt.Level));
- string relativePath = String.Format(@"{0}\{1:D4}\{1:D4}_{2:D4}.{3}",
- qt.Level, qt.Row, qt.Col, m_imageFileExtension);
-
- if(m_dataDirectory != null)
- {
- // Search data directory first
- string rawFullPath = Path.Combine( m_dataDirectory, relativePath );
- if(File.Exists(rawFullPath))
- return rawFullPath;
- }
+ //List of cache structures to try, in order of preference
+ string[] patternArray = {
+ @"{0}\{1:D1}\{1:D1}_{2:D1}.{3}",
+ @"{0}\{1:D4}\{1:D4}_{2:D4}.{3}"
+ };
+
+ foreach(string relativePattern in patternArray) {
+ //Try each pattern through
+ string relativePath = String.Format(relativePattern,
+ qt.Level, qt.Row, qt.Col, m_imageFileExtension);
+
+ if(m_dataDirectory != null)
+ {
+ // Search data directory first
+ string rawFullPath = Path.Combine( m_dataDirectory, relativePath );
+ if(File.Exists(rawFullPath))
+ return rawFullPath;
+ }
- // If cache doesn't exist, fall back to duplicate texture path.
- if (m_cacheDirectory == null)
- return m_duplicateTexturePath;
-
- // Try cache with default file extension
- string cacheFullPath = Path.Combine( m_cacheDirectory, relativePath );
- if(File.Exists(cacheFullPath))
- return cacheFullPath;
+ // If cache doesn't exist, fall back to duplicate texture path.
+ if (m_cacheDirectory == null)
+ return m_duplicateTexturePath;
+
+ // Try cache with default file extension
+ string cacheFullPath = Path.Combine( m_cacheDirectory, relativePath );
+ if(File.Exists(cacheFullPath))
+ return cacheFullPath;
- // Try cache but accept any valid image file extension
- const string ValidExtensions = ".bmp.dds.dib.hdr.jpg.jpeg.pfm.png.ppm.tga.gif.tif";
-
- string cacheSearchPath = Path.GetDirectoryName(cacheFullPath);
- if(Directory.Exists(cacheSearchPath))
- {
- foreach( string imageFile in Directory.GetFiles(
- cacheSearchPath,
- Path.GetFileNameWithoutExtension(cacheFullPath) + ".*") )
- {
- string extension = Path.GetExtension(imageFile).ToLower();
- if(ValidExtensions.IndexOf(extension)<0)
- continue;
+ // Try cache but accept any valid image file extension
+ const string ValidExtensions = ".bmp.dds.dib.hdr.jpg.jpeg.pfm.png.ppm.tga.gif.tif";
+
+ string cacheSearchPath = Path.GetDirectoryName(cacheFullPath);
+ if(Directory.Exists(cacheSearchPath))
+ {
+ foreach( string imageFile in Directory.GetFiles(
+ cacheSearchPath,
+ Path.GetFileNameWithoutExtension(cacheFullPath) + ".*") )
+ {
+ string extension = Path.GetExtension(imageFile).ToLower();
+ if(ValidExtensions.IndexOf(extension)<0)
+ continue;
- return imageFile;
- }
- }
+ return imageFile;
+ }
+ }
+ }
- return cacheFullPath;
+ //If it's not anywhere in cache, use the first (preferred) pattern, in the cache directory
+ string defaultPath = String.Format(patternArray[0],
+ qt.Level, qt.Row, qt.Col, m_imageFileExtension);
+ string defaultFullPath = Path.Combine(m_cacheDirectory, defaultPath);
+
+ return defaultFullPath;
}
/// <summary>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <amm...@us...> - 2009-12-05 13:25:06
|
Revision: 4086
http://nasa-exp.svn.sourceforge.net/nasa-exp/?rev=4086&view=rev
Author: ammianus
Date: 2009-12-05 13:24:58 +0000 (Sat, 05 Dec 2009)
Log Message:
-----------
Fiveofoh's fix for a memory leak as specified in the forums:
http://forum.worldwindcentral.com/showthread.php?p=73008
Issue #10, http://worldwindcentral.com/wiki/1_4_1_Issues
Modified Paths:
--------------
trunk/WorldWind/PluginSDK/Terrain/NltTerrainAccessor.cs
Modified: trunk/WorldWind/PluginSDK/Terrain/NltTerrainAccessor.cs
===================================================================
--- trunk/WorldWind/PluginSDK/Terrain/NltTerrainAccessor.cs 2009-12-05 13:23:11 UTC (rev 4085)
+++ trunk/WorldWind/PluginSDK/Terrain/NltTerrainAccessor.cs 2009-12-05 13:24:58 UTC (rev 4086)
@@ -304,7 +304,7 @@
}
}
- m_tileCache.Remove(oldestTile);
+ m_tileCache.Remove(oldestTile.TerrainTile.TerrainTileFilePath);
}
m_tileCache.Add(ttce.TerrainTile.TerrainTileFilePath, ttce);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <amm...@us...> - 2009-12-05 13:23:21
|
Revision: 4085
http://nasa-exp.svn.sourceforge.net/nasa-exp/?rev=4085&view=rev
Author: ammianus
Date: 2009-12-05 13:23:11 +0000 (Sat, 05 Dec 2009)
Log Message:
-----------
fiveofoh's changes for Issues #5, 10 from 1_4_1_Issues list
http://worldwindcentral.com/wiki/1_4_1_Issues
Modified Paths:
--------------
branches/ammianus/PluginSDK/ImageStore.cs
branches/ammianus/PluginSDK/Terrain/NltTerrainAccessor.cs
Modified: branches/ammianus/PluginSDK/ImageStore.cs
===================================================================
--- branches/ammianus/PluginSDK/ImageStore.cs 2009-11-24 02:22:53 UTC (rev 4084)
+++ branches/ammianus/PluginSDK/ImageStore.cs 2009-12-05 13:23:11 UTC (rev 4085)
@@ -213,51 +213,79 @@
#endregion
- public virtual string GetLocalPath(QuadTile qt)
+ /// <summary>
+ /// Returns a path to be used for local storage of the tile
+ /// Checks through various places before just assinging to cache, in this order.
+ /// If it finds a tile in any of these places, it immediately returns the path.
+ /// 1. The "Data" directory (if existent), under its folder structure
+ /// 2. If the QTS doesn't have a cache directory, it just returns the m_duplicateTexturePath
+ /// 3. If it has a cache directory, first with the default file extension, then checks for others
+ /// 4. If not found in any of these, it simply constructs the path
+ /// from cache directory and default extension, and returns that path
+ ///
+ /// This method also checks for tiles in the old, pre-1.4.1 cache structure if it can't find it
+ /// in the new WWJ format. If it can't find it in the old structure, it returns a WWJ-style
+ /// path to store a new tile in.
+ /// </summary>
+ public virtual string GetLocalPath(QuadTile qt)
{
if(qt.Level >= m_levelCount)
throw new ArgumentException(string.Format("Level {0} not available.",
qt.Level));
- string relativePath = String.Format(@"{0}\{1:D4}\{1:D4}_{2:D4}.{3}",
- qt.Level, qt.Row, qt.Col, m_imageFileExtension);
-
- if(m_dataDirectory != null)
- {
- // Search data directory first
- string rawFullPath = Path.Combine( m_dataDirectory, relativePath );
- if(File.Exists(rawFullPath))
- return rawFullPath;
- }
+ //List of cache structures to try, in order of preference
+ string[] patternArray = {
+ @"{0}\{1:D1}\{1:D1}_{2:D1}.{3}",
+ @"{0}\{1:D4}\{1:D4}_{2:D4}.{3}"
+ };
+
+ foreach(string relativePattern in patternArray) {
+ //Try each pattern through
+ string relativePath = String.Format(relativePattern,
+ qt.Level, qt.Row, qt.Col, m_imageFileExtension);
+
+ if(m_dataDirectory != null)
+ {
+ // Search data directory first
+ string rawFullPath = Path.Combine( m_dataDirectory, relativePath );
+ if(File.Exists(rawFullPath))
+ return rawFullPath;
+ }
- // If cache doesn't exist, fall back to duplicate texture path.
- if (m_cacheDirectory == null)
- return m_duplicateTexturePath;
-
- // Try cache with default file extension
- string cacheFullPath = Path.Combine( m_cacheDirectory, relativePath );
- if(File.Exists(cacheFullPath))
- return cacheFullPath;
+ // If cache doesn't exist, fall back to duplicate texture path.
+ if (m_cacheDirectory == null)
+ return m_duplicateTexturePath;
+
+ // Try cache with default file extension
+ string cacheFullPath = Path.Combine( m_cacheDirectory, relativePath );
+ if(File.Exists(cacheFullPath))
+ return cacheFullPath;
- // Try cache but accept any valid image file extension
- const string ValidExtensions = ".bmp.dds.dib.hdr.jpg.jpeg.pfm.png.ppm.tga.gif.tif";
-
- string cacheSearchPath = Path.GetDirectoryName(cacheFullPath);
- if(Directory.Exists(cacheSearchPath))
- {
- foreach( string imageFile in Directory.GetFiles(
- cacheSearchPath,
- Path.GetFileNameWithoutExtension(cacheFullPath) + ".*") )
- {
- string extension = Path.GetExtension(imageFile).ToLower();
- if(ValidExtensions.IndexOf(extension)<0)
- continue;
+ // Try cache but accept any valid image file extension
+ const string ValidExtensions = ".bmp.dds.dib.hdr.jpg.jpeg.pfm.png.ppm.tga.gif.tif";
+
+ string cacheSearchPath = Path.GetDirectoryName(cacheFullPath);
+ if(Directory.Exists(cacheSearchPath))
+ {
+ foreach( string imageFile in Directory.GetFiles(
+ cacheSearchPath,
+ Path.GetFileNameWithoutExtension(cacheFullPath) + ".*") )
+ {
+ string extension = Path.GetExtension(imageFile).ToLower();
+ if(ValidExtensions.IndexOf(extension)<0)
+ continue;
- return imageFile;
- }
- }
+ return imageFile;
+ }
+ }
+ }
- return cacheFullPath;
+ //If it's not anywhere in cache, use the first (preferred) pattern, in the cache directory
+ string defaultPath = String.Format(patternArray[0],
+ qt.Level, qt.Row, qt.Col, m_imageFileExtension);
+ string defaultFullPath = Path.Combine(m_cacheDirectory, defaultPath);
+
+ return defaultFullPath;
}
/// <summary>
Modified: branches/ammianus/PluginSDK/Terrain/NltTerrainAccessor.cs
===================================================================
--- branches/ammianus/PluginSDK/Terrain/NltTerrainAccessor.cs 2009-11-24 02:22:53 UTC (rev 4084)
+++ branches/ammianus/PluginSDK/Terrain/NltTerrainAccessor.cs 2009-12-05 13:23:11 UTC (rev 4085)
@@ -304,7 +304,7 @@
}
}
- m_tileCache.Remove(oldestTile);
+ m_tileCache.Remove(oldestTile.TerrainTile.TerrainTileFilePath);
}
m_tileCache.Add(ttce.TerrainTile.TerrainTileFilePath, ttce);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <amm...@us...> - 2009-11-24 02:23:00
|
Revision: 4084
http://nasa-exp.svn.sourceforge.net/nasa-exp/?rev=4084&view=rev
Author: ammianus
Date: 2009-11-24 02:22:53 +0000 (Tue, 24 Nov 2009)
Log Message:
-----------
The ICSharpCode.SharpZipLib.dll and Tao.OpenGl.Glu.dll are required to build in Release mode. Adding based on suggestion from forum user James_In_Utah.
Added Paths:
-----------
trunk/WorldWind/bin/Release/ICSharpCode.SharpZipLib.dll
trunk/WorldWind/bin/Release/Tao.OpenGl.Glu.dll
Added: trunk/WorldWind/bin/Release/ICSharpCode.SharpZipLib.dll
===================================================================
(Binary files differ)
Property changes on: trunk/WorldWind/bin/Release/ICSharpCode.SharpZipLib.dll
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/WorldWind/bin/Release/Tao.OpenGl.Glu.dll
===================================================================
(Binary files differ)
Property changes on: trunk/WorldWind/bin/Release/Tao.OpenGl.Glu.dll
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <amm...@us...> - 2009-09-14 00:57:06
|
Revision: 4083
http://nasa-exp.svn.sourceforge.net/nasa-exp/?rev=4083&view=rev
Author: ammianus
Date: 2009-09-14 00:56:50 +0000 (Mon, 14 Sep 2009)
Log Message:
-----------
1_4_1 Issue #4 - Fix for Stars3D.cs Plug-in. Fixed issue where unchecking the Starfield box in LayerManager would not hide the background stars. Made this setting persistant to .ini file.
Modified Paths:
--------------
trunk/WorldWind/WorldWind/Stars3D.cs
Modified: trunk/WorldWind/WorldWind/Stars3D.cs
===================================================================
--- trunk/WorldWind/WorldWind/Stars3D.cs 2009-08-23 13:20:17 UTC (rev 4082)
+++ trunk/WorldWind/WorldWind/Stars3D.cs 2009-09-14 00:56:50 UTC (rev 4083)
@@ -1,6 +1,6 @@
//----------------------------------------------------------------------------
// NAME: Stars3D
-// VERSION: 1.1
+// VERSION: 1.2
// DESCRIPTION: Renders a 3D star background to the world. Data comes from the Hipparcos catalog (ESA, 1997). Adds itself as a layer in Layer Manager (key: L). Right click on layer for settings.
// DEVELOPER: Patrick Murris
// WEBSITE: http://www.alpix.com/3d/worldwin
@@ -8,6 +8,7 @@
// Based on the Sky plugin, itself based on Bjorn Reppen 'Atmosphere' plugin
// Star data extracted using VizieR at http://cdsweb.u-strasbg.fr
//----------------------------------------------------------------------------
+// 1.2 Aug 1, 2009 Fixed issue where unchecking the Starfield box in LayerManager would not hide the background stars. Made this setting persistant to .ini file.
// 1.1 Dec 27, 2005 Added bright stars halo/flare
// 1.0 Nov 19, 2005 First light with up to 31k stars from the Hipparcos catalog
//----------------------------------------------------------------------------
@@ -76,6 +77,8 @@
private double sphereRadius;
private Texture texture;
public string textureFileName = "Flare.png";
+ private bool m_initialIsOnFlag = true;
+
// default star catalog
public string catalogFileName = "Hipparcos_Stars_Mag6x5044.tsv";
@@ -112,6 +115,11 @@
string saveVersion = settingsList[0]; // version when settings where saved
if(settingsList[1] != null) catalogFileName = settingsList[1];
if(settingsList.Length >= 3) showFlares = (settingsList[2] == "False") ? false : true;
+ if(settingsList.Length >= 4) IsOn = (settingsList[3] == "False") ? false : true;
+ //save this to check whether we need to change the ini settings on Dispose
+ m_initialIsOnFlag = IsOn;
+
+
}
}
@@ -120,7 +128,7 @@
/// </summary>
public void SaveSettings()
{
- string line = version + ";" + catalogFileName + ";" + showFlares.ToString();
+ string line = version + ";" + catalogFileName + ";" + showFlares.ToString() + ";" + IsOn;
try
{
StreamWriter sw = new StreamWriter(Path.Combine(pluginPath, settingsFileName));
@@ -141,6 +149,9 @@
if(!isInitialized)
return;
+ if (!this.IsOn)
+ return;
+
// Camera & Device shortcuts ;)
CameraBase camera = drawArgs.WorldCamera;
Device device = drawArgs.device;
@@ -458,7 +469,14 @@
/// </summary>
public override void Dispose()
{
- isInitialized = false;
+ //this saves whether you had Starfield checked in LayerManager or not when unloading(?)
+ //the Plugin or Exiting WorldWind.
+ if (IsOn != m_initialIsOnFlag)
+ {
+ SaveSettings();
+ }
+
+ isInitialized = false;
if(StarListVB != null)
{
StarListVB = null;
@@ -535,6 +553,7 @@
if(i != -1) cboTexture.SelectedIndex = i;
// Flares
chkFlares.Checked = layer.showFlares;
+
}
#region Windows Form Designer generated code
@@ -549,7 +568,6 @@
this.lblTexture = new System.Windows.Forms.Label();
this.cboTexture = new System.Windows.Forms.ComboBox();
this.lblFlares = new System.Windows.Forms.Label();
- this.chkFlares = new System.Windows.Forms.CheckBox();
this.SuspendLayout();
//
// btnCancel
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <amm...@us...> - 2009-08-23 13:20:25
|
Revision: 4082
http://nasa-exp.svn.sourceforge.net/nasa-exp/?rev=4082&view=rev
Author: ammianus
Date: 2009-08-23 13:20:17 +0000 (Sun, 23 Aug 2009)
Log Message:
-----------
1_4_1 Issue #12 - Fix for Atmosphere.cs Plug-in "System.NullReferenceException: Object reference not set to an instance of an object." exception. This is occurring because in Atmosphere.cs it is trying to reference the World statically, when it should be doing it using the member world.
Modified Paths:
--------------
trunk/WorldWind/WorldWind/Atmosphere.cs
Modified: trunk/WorldWind/WorldWind/Atmosphere.cs
===================================================================
--- trunk/WorldWind/WorldWind/Atmosphere.cs 2009-08-23 13:14:26 UTC (rev 4081)
+++ trunk/WorldWind/WorldWind/Atmosphere.cs 2009-08-23 13:20:17 UTC (rev 4082)
@@ -195,7 +195,7 @@
// Set new one (to avoid being clipped) - probably better ways of doing this?
float aspectRatio = (float)device.Viewport.Width / device.Viewport.Height;
- device.Transform.Projection = Matrix.PerspectiveFovRH((float)camera.Fov.Radians, aspectRatio, 1, (float)(2*World.EquatorialRadius) );
+ device.Transform.Projection = Matrix.PerspectiveFovRH((float)camera.Fov.Radians, aspectRatio, 1, (float)(2*world.EquatorialRadius) );
device.TextureState[0].ColorOperation = TextureOperation.BlendCurrentAlpha;
// Draw our 2 triangles
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|