From 997c7145ab165bb90ec7924e6f28184345524ba3 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Mon, 7 Jan 2013 01:34:33 -0500 Subject: [PATCH] Bare bones geom package --- src/ol/geom/geometry.js | 7 +++++++ src/ol/geom/linestring.js | 19 +++++++++++++++++++ src/ol/geom/multilinestring.js | 19 +++++++++++++++++++ src/ol/geom/multipoint.js | 19 +++++++++++++++++++ src/ol/geom/multipolygon.js | 19 +++++++++++++++++++ src/ol/geom/point.js | 19 +++++++++++++++++++ src/ol/geom/polygon.js | 19 +++++++++++++++++++ 7 files changed, 121 insertions(+) create mode 100644 src/ol/geom/geometry.js create mode 100644 src/ol/geom/linestring.js create mode 100644 src/ol/geom/multilinestring.js create mode 100644 src/ol/geom/multipoint.js create mode 100644 src/ol/geom/multipolygon.js create mode 100644 src/ol/geom/point.js create mode 100644 src/ol/geom/polygon.js diff --git a/src/ol/geom/geometry.js b/src/ol/geom/geometry.js new file mode 100644 index 0000000000..57f8ec0545 --- /dev/null +++ b/src/ol/geom/geometry.js @@ -0,0 +1,7 @@ +goog.provide('ol.geom.Geometry'); + + +/** + * @interface + */ +ol.geom.Geometry = function() {}; diff --git a/src/ol/geom/linestring.js b/src/ol/geom/linestring.js new file mode 100644 index 0000000000..241aff7dfd --- /dev/null +++ b/src/ol/geom/linestring.js @@ -0,0 +1,19 @@ +goog.provide('ol.geom.LineString'); + +goog.require('ol.geom.Geometry'); + + + +/** + * @constructor + * @implements {ol.geom.Geometry} + * @param {Array} coordinates Coordinates array. + */ +ol.geom.LineString = function(coordinates) { + + /** + * @type {Array} + */ + this.coordinates = coordinates; + +}; diff --git a/src/ol/geom/multilinestring.js b/src/ol/geom/multilinestring.js new file mode 100644 index 0000000000..0665f9d630 --- /dev/null +++ b/src/ol/geom/multilinestring.js @@ -0,0 +1,19 @@ +goog.provide('ol.geom.MultiLineString'); + +goog.require('ol.geom.Geometry'); + + + +/** + * @constructor + * @implements {ol.geom.Geometry} + * @param {Array} coordinates Coordinates array. + */ +ol.geom.MultiLineString = function(coordinates) { + + /** + * @type {Array} + */ + this.coordinates = coordinates; + +}; diff --git a/src/ol/geom/multipoint.js b/src/ol/geom/multipoint.js new file mode 100644 index 0000000000..586730f6b6 --- /dev/null +++ b/src/ol/geom/multipoint.js @@ -0,0 +1,19 @@ +goog.provide('ol.geom.MultiPoint'); + +goog.require('ol.geom.Geometry'); + + + +/** + * @constructor + * @implements {ol.geom.Geometry} + * @param {Array} coordinates Coordinates array. + */ +ol.geom.MultiPoint = function(coordinates) { + + /** + * @type {Array} + */ + this.coordinates = coordinates; + +}; diff --git a/src/ol/geom/multipolygon.js b/src/ol/geom/multipolygon.js new file mode 100644 index 0000000000..4f22f0d003 --- /dev/null +++ b/src/ol/geom/multipolygon.js @@ -0,0 +1,19 @@ +goog.provide('ol.geom.MultiPolygon'); + +goog.require('ol.geom.Geometry'); + + + +/** + * @constructor + * @implements {ol.geom.Geometry} + * @param {Array} coordinates Coordinates array. + */ +ol.geom.MultiPolygon = function(coordinates) { + + /** + * @type {Array} + */ + this.coordinates = coordinates; + +}; diff --git a/src/ol/geom/point.js b/src/ol/geom/point.js new file mode 100644 index 0000000000..2f4e2b6d64 --- /dev/null +++ b/src/ol/geom/point.js @@ -0,0 +1,19 @@ +goog.provide('ol.geom.Point'); + +goog.require('ol.geom.Geometry'); + + + +/** + * @constructor + * @implements {ol.geom.Geometry} + * @param {Array} coordinates Coordinates array. + */ +ol.geom.Point = function(coordinates) { + + /** + * @type {Array} + */ + this.coordinates = coordinates; + +}; diff --git a/src/ol/geom/polygon.js b/src/ol/geom/polygon.js new file mode 100644 index 0000000000..bd0f698c7d --- /dev/null +++ b/src/ol/geom/polygon.js @@ -0,0 +1,19 @@ +goog.provide('ol.geom.Polygon'); + +goog.require('ol.geom.Geometry'); + + + +/** + * @constructor + * @implements {ol.geom.Geometry} + * @param {Array} coordinates Coordinates array. + */ +ol.geom.Polygon = function(coordinates) { + + /** + * @type {Array} + */ + this.coordinates = coordinates; + +};