[Opengeoscience-developers] OpenGeoscience branch, enhance_map_api, updated. d6e0f37d6a191b930907c52de66138177776154d

Aashish Chaudhary aashish.chaudhary at kitware.com
Mon Mar 4 12:24:13 EST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "OpenGeoscience".

The branch, enhance_map_api has been updated
       via  d6e0f37d6a191b930907c52de66138177776154d (commit)
      from  e8f1834140920aaebaa19f44f40957a673ba9581 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://public.kitware.com/gitweb?p=OpenGeoscience/opengeoscience.git;a=commitdiff;h=d6e0f37d6a191b930907c52de66138177776154d
commit d6e0f37d6a191b930907c52de66138177776154d
Author:     Aashish Chaudhary <aashish.chaudhary at kitware.com>
AuthorDate: Mon Mar 4 12:24:01 2013 -0500
Commit:     Aashish Chaudhary <aashish.chaudhary at kitware.com>
CommitDate: Mon Mar 4 12:24:01 2013 -0500

    Added missing files

diff --git a/web/lib/geo/feature.js b/web/lib/geo/feature.js
new file mode 100644
index 0000000..d5591aa
--- /dev/null
+++ b/web/lib/geo/feature.js
@@ -0,0 +1,73 @@
+/*========================================================================
+  VGL --- VTK WebGL Rendering Toolkit
+
+  Copyright 2013 Kitware, Inc.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ ========================================================================*/
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Feature base class
+//
+//////////////////////////////////////////////////////////////////////////////
+
+geoModule.feature = function() {
+
+  if (!(this instanceof geoModule.feature)) {
+    return new geoModule.feature();
+  }
+
+  /// Register with base class
+  ogs.vgl.actor.call(this);
+
+
+  return this;
+};
+
+inherit(geoModule.feature, ogs.vgl.actor);
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Plane feature class
+//
+// Create a plane feature given a lower left corner point {ogs.geo.latlng} and
+// and upper right corner point {ogs.geo.latlng}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+geoModule.planeFeature = function(lowerleft, upperright) {
+
+  if (!(this instanceof geoModule.planeFeature)) {
+    return new geoModule.planeFeature(lowerleft, upperright);
+  }
+
+  ogs.vgl.actor.call(this);
+
+  /// Initialize
+  var origin = [lowerleft.lng(), lowerleft.lat(), 0.0];
+  var pt2 = [lowerleft.lng(), upperright.lat(), 0.0];
+  var pt1 = [upperright.lng(), lowerleft.lat(), 0.0];
+
+  var actor = ogs.vgl.utils.createPlane(origin[0], origin[1], origin[2],
+                                         pt1[0], pt1[1], pt1[2],
+                                         pt2[0], pt2[1], pt2[2]);
+
+
+  this.setMapper(actor.mapper());
+  this.setMaterial(actor.material());
+
+  return this;
+};
+
+inherit(geoModule.planeFeature, geoModule.feature);
diff --git a/web/lib/geo/latlng.js b/web/lib/geo/latlng.js
new file mode 100644
index 0000000..920198d
--- /dev/null
+++ b/web/lib/geo/latlng.js
@@ -0,0 +1,48 @@
+/*========================================================================
+  VGL --- VTK WebGL Rendering Toolkit
+
+  Copyright 2013 Kitware, Inc.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ ========================================================================*/
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// latlng class defines a geodesy coordinate
+//
+///////////////////////////////////////////////////////////////////////////////
+
+/**
+ * A latlng encapsulates geodesy coordinate defined by latitude and longitude
+ *
+ */
+geoModule.latlng = function(lat, lng) {
+  if (!(this instanceof geoModule.latlng)) {
+    return new geoModule.latlng(lat, lng);
+  }
+
+  /// Private member variables
+  var m_lat = lat;
+  var m_lng = lng;
+
+  /// Public member methods
+  this.lat = function() {
+      return m_lat;
+  };
+
+  this.lng = function() {
+    return m_lng;
+  };
+
+  return this;
+};

-----------------------------------------------------------------------

Summary of changes:
 web/lib/geo/feature.js                   |   73 ++++++++++++++++++++++++++++++
 web/lib/{vgl/object.js => geo/latlng.js} |   39 ++++++++--------
 2 files changed, 92 insertions(+), 20 deletions(-)
 create mode 100644 web/lib/geo/feature.js
 copy web/lib/{vgl/object.js => geo/latlng.js} (67%)


hooks/post-receive
-- 
OpenGeoscience



More information about the Opengeoscience-developers mailing list