Rename ol.geom.VertexArray to ol.CoordinateArray

This commit is contained in:
Tim Schaub
2013-08-30 13:30:53 -06:00
parent 7165d414c7
commit 58fe110419
10 changed files with 36 additions and 36 deletions

View File

@@ -1,4 +1,5 @@
goog.provide('ol.Coordinate');
goog.provide('ol.CoordinateArray');
goog.provide('ol.CoordinateFormatType');
goog.provide('ol.coordinate');
@@ -18,6 +19,13 @@ ol.CoordinateFormatType;
ol.Coordinate;
/**
* An array of coordinate arrays.
* @typedef {Array.<ol.Coordinate>}
*/
ol.CoordinateArray;
/**
* @param {ol.Coordinate} coordinate Coordinate.
* @param {ol.Coordinate} delta Delta.

View File

@@ -1,14 +1,6 @@
goog.provide('ol.geom.VertexArray');
goog.require('ol.coordinate');
/**
* @typedef {Array.<ol.geom.Vertex>}
*/
ol.geom.VertexArray;
/**
* Calculate the squared distance from a point to a line segment.
*

View File

@@ -1,16 +1,16 @@
goog.provide('ol.geom.LinearRing');
goog.require('ol.CoordinateArray');
goog.require('ol.geom.GeometryType');
goog.require('ol.geom.LineString');
goog.require('ol.geom.SharedVertices');
goog.require('ol.geom.VertexArray');
/**
* @constructor
* @extends {ol.geom.LineString}
* @param {ol.geom.VertexArray} coordinates Vertex array (e.g.
* @param {ol.CoordinateArray} coordinates Vertex array (e.g.
* [[x0, y0], [x1, y1]]).
* @param {ol.geom.SharedVertices=} opt_shared Shared vertices.
*/
@@ -39,7 +39,7 @@ goog.inherits(ol.geom.LinearRing, ol.geom.LineString);
* implementation for an example of this.
* https://github.com/OSGeo/gdal/blob/trunk/gdal/ogr/ogrlinearring.cpp
*
* @param {ol.geom.VertexArray} coordinates Linear ring coordinates.
* @param {ol.CoordinateArray} coordinates Linear ring coordinates.
* @return {boolean} The coordinates are in clockwise order.
*/
ol.geom.LinearRing.isClockwise = function(coordinates) {

View File

@@ -1,17 +1,17 @@
goog.provide('ol.geom.LineString');
goog.require('goog.asserts');
goog.require('ol.CoordinateArray');
goog.require('ol.geom.Geometry');
goog.require('ol.geom.GeometryType');
goog.require('ol.geom.SharedVertices');
goog.require('ol.geom.VertexArray');
/**
* @constructor
* @extends {ol.geom.Geometry}
* @param {ol.geom.VertexArray} coordinates Vertex array (e.g.
* @param {ol.CoordinateArray} coordinates Vertex array (e.g.
* [[x0, y0], [x1, y1]]).
* @param {ol.geom.SharedVertices=} opt_shared Shared vertices.
*/
@@ -67,7 +67,7 @@ ol.geom.LineString.prototype.get = function(index, dim) {
/**
* @inheritDoc
* @return {ol.geom.VertexArray} Coordinates array.
* @return {ol.CoordinateArray} Coordinates array.
*/
ol.geom.LineString.prototype.getCoordinates = function() {
var count = this.getCount();

View File

@@ -1,18 +1,18 @@
goog.provide('ol.geom.MultiLineString');
goog.require('goog.asserts');
goog.require('ol.CoordinateArray');
goog.require('ol.geom.AbstractCollection');
goog.require('ol.geom.GeometryType');
goog.require('ol.geom.LineString');
goog.require('ol.geom.SharedVertices');
goog.require('ol.geom.VertexArray');
/**
* @constructor
* @extends {ol.geom.AbstractCollection}
* @param {Array.<ol.geom.VertexArray>} coordinates Coordinates array.
* @param {Array.<ol.CoordinateArray>} coordinates Coordinates array.
* @param {ol.geom.SharedVertices=} opt_shared Shared vertices.
*/
ol.geom.MultiLineString = function(coordinates, opt_shared) {

View File

@@ -1,18 +1,18 @@
goog.provide('ol.geom.MultiPoint');
goog.require('goog.asserts');
goog.require('ol.CoordinateArray');
goog.require('ol.geom.AbstractCollection');
goog.require('ol.geom.GeometryType');
goog.require('ol.geom.Point');
goog.require('ol.geom.SharedVertices');
goog.require('ol.geom.VertexArray');
/**
* @constructor
* @extends {ol.geom.AbstractCollection}
* @param {ol.geom.VertexArray} coordinates Coordinates array.
* @param {ol.CoordinateArray} coordinates Coordinates array.
* @param {ol.geom.SharedVertices=} opt_shared Shared vertices.
*/
ol.geom.MultiPoint = function(coordinates, opt_shared) {

View File

@@ -1,18 +1,18 @@
goog.provide('ol.geom.MultiPolygon');
goog.require('goog.asserts');
goog.require('ol.CoordinateArray');
goog.require('ol.geom.AbstractCollection');
goog.require('ol.geom.GeometryType');
goog.require('ol.geom.Polygon');
goog.require('ol.geom.SharedVertices');
goog.require('ol.geom.VertexArray');
/**
* @constructor
* @extends {ol.geom.AbstractCollection}
* @param {Array.<Array.<ol.geom.VertexArray>>} coordinates Coordinates
* @param {Array.<Array.<ol.CoordinateArray>>} coordinates Coordinates
* array.
* @param {ol.geom.SharedVertices=} opt_shared Shared vertices.
*/

View File

@@ -1,12 +1,12 @@
goog.provide('ol.geom.Polygon');
goog.require('goog.asserts');
goog.require('ol.CoordinateArray');
goog.require('ol.extent');
goog.require('ol.geom.Geometry');
goog.require('ol.geom.GeometryType');
goog.require('ol.geom.LinearRing');
goog.require('ol.geom.SharedVertices');
goog.require('ol.geom.VertexArray');
@@ -19,7 +19,7 @@ goog.require('ol.geom.VertexArray');
*
* @constructor
* @extends {ol.geom.Geometry}
* @param {Array.<ol.geom.VertexArray>} coordinates Array of rings. First
* @param {Array.<ol.CoordinateArray>} coordinates Array of rings. First
* is outer, any remaining are inner.
* @param {ol.geom.SharedVertices=} opt_shared Shared vertices.
*/
@@ -89,7 +89,7 @@ ol.geom.Polygon.prototype.getBounds = function() {
/**
* @return {Array.<ol.geom.VertexArray>} Coordinates array.
* @return {Array.<ol.CoordinateArray>} Coordinates array.
*/
ol.geom.Polygon.prototype.getCoordinates = function() {
var count = this.rings.length;

View File

@@ -2,7 +2,7 @@ goog.provide('ol.geom.SharedVertices');
goog.require('goog.asserts');
goog.require('ol.Coordinate');
goog.require('ol.geom.VertexArray');
goog.require('ol.CoordinateArray');
/**
@@ -60,7 +60,7 @@ ol.geom.SharedVertices = function(opt_options) {
/**
* Adds a vertex array to the shared coordinate array.
* @param {ol.geom.VertexArray} vertices Array of vertices.
* @param {ol.CoordinateArray} vertices Array of vertices.
* @return {number} Index used to reference the added vertex array.
*/
ol.geom.SharedVertices.prototype.add = function(vertices) {

View File

@@ -1,6 +1,7 @@
goog.provide('ol.parser.TopoJSON');
goog.require('ol.Coordinate');
goog.require('ol.CoordinateArray');
goog.require('ol.Feature');
goog.require('ol.geom.GeometryType');
goog.require('ol.geom.LineString');
@@ -9,7 +10,6 @@ goog.require('ol.geom.MultiPoint');
goog.require('ol.geom.MultiPolygon');
goog.require('ol.geom.Point');
goog.require('ol.geom.Polygon');
goog.require('ol.geom.VertexArray');
goog.require('ol.parser.Parser');
goog.require('ol.parser.ReadFeaturesOptions');
goog.require('ol.parser.StringFeatureParser');
@@ -41,8 +41,8 @@ goog.addSingletonGetter(ol.parser.TopoJSON);
* Concatenate arcs into a coordinate array.
* @param {Array.<number>} indices Indices of arcs to concatenate. Negative
* values indicate arcs need to be reversed.
* @param {Array.<ol.geom.VertexArray>} arcs Arcs (already transformed).
* @return {ol.geom.VertexArray} Coordinate array.
* @param {Array.<ol.CoordinateArray>} arcs Arcs (already transformed).
* @return {ol.CoordinateArray} Coordinate array.
* @private
*/
ol.parser.TopoJSON.prototype.concatenateArcs_ = function(indices, arcs) {
@@ -117,7 +117,7 @@ ol.parser.TopoJSON.prototype.readFeaturesFromObject =
* Create a feature from a TopoJSON geometry object.
*
* @param {TopoJSONGeometry} object TopoJSON geometry object.
* @param {Array.<ol.geom.VertexArray>} arcs Array of arcs.
* @param {Array.<ol.CoordinateArray>} arcs Array of arcs.
* @param {Array.<number>} scale Scale for each dimension.
* @param {Array.<number>} translate Translation for each dimension.
* @param {ol.parser.ReadFeaturesOptions=} opt_options Reader options.
@@ -163,7 +163,7 @@ ol.parser.TopoJSON.prototype.readFeatureFromGeometry_ = function(object, arcs,
*
* @param {TopoJSONGeometryCollection} collection TopoJSON GeometryCollection
* object.
* @param {Array.<ol.geom.VertexArray>} arcs Array of arcs.
* @param {Array.<ol.CoordinateArray>} arcs Array of arcs.
* @param {Array.<number>} scale Scale for each dimension.
* @param {Array.<number>} translate Translation for each dimension.
* @param {ol.parser.ReadFeaturesOptions=} opt_options Reader options.
@@ -217,7 +217,7 @@ ol.parser.TopoJSON.prototype.readFeaturesFromTopology_ = function(
* Create a linestring from a TopoJSON geometry object.
*
* @param {TopoJSONLineString} object TopoJSON object.
* @param {Array.<ol.geom.VertexArray>} arcs Array of arcs.
* @param {Array.<ol.CoordinateArray>} arcs Array of arcs.
* @param {ol.parser.ReadFeaturesOptions=} opt_options Reader options.
* @return {ol.geom.LineString} Geometry.
* @private
@@ -239,7 +239,7 @@ ol.parser.TopoJSON.prototype.readLineString_ = function(object, arcs,
* Create a multi-linestring from a TopoJSON geometry object.
*
* @param {TopoJSONMultiLineString} object TopoJSON object.
* @param {Array.<ol.geom.VertexArray>} arcs Array of arcs.
* @param {Array.<ol.CoordinateArray>} arcs Array of arcs.
* @param {ol.parser.ReadFeaturesOptions=} opt_options Reader options.
* @return {ol.geom.MultiLineString} Geometry.
* @private
@@ -293,7 +293,7 @@ ol.parser.TopoJSON.prototype.readMultiPoint_ = function(object, scale,
* Create a multi-polygon from a TopoJSON geometry object.
*
* @param {TopoJSONMultiPolygon} object TopoJSON object.
* @param {Array.<ol.geom.VertexArray>} arcs Array of arcs.
* @param {Array.<ol.CoordinateArray>} arcs Array of arcs.
* @param {ol.parser.ReadFeaturesOptions=} opt_options Reader options.
* @return {ol.geom.MultiPolygon} Geometry.
* @private
@@ -353,7 +353,7 @@ ol.parser.TopoJSON.prototype.readPoint_ = function(object, scale, translate,
* Create a polygon from a TopoJSON geometry object.
*
* @param {TopoJSONPolygon} object TopoJSON object.
* @param {Array.<ol.geom.VertexArray>} arcs Array of arcs.
* @param {Array.<ol.CoordinateArray>} arcs Array of arcs.
* @param {ol.parser.ReadFeaturesOptions=} opt_options Reader options.
* @return {ol.geom.Polygon} Geometry.
* @private
@@ -380,7 +380,7 @@ ol.parser.TopoJSON.prototype.readPolygon_ = function(object, arcs,
* Apply a linear transform to array of arcs. The provided array of arcs is
* modified in place.
*
* @param {Array.<ol.geom.VertexArray>} arcs Array of arcs.
* @param {Array.<ol.CoordinateArray>} arcs Array of arcs.
* @param {Array.<number>} scale Scale for each dimension.
* @param {Array.<number>} translate Translation for each dimension.
* @private
@@ -395,7 +395,7 @@ ol.parser.TopoJSON.prototype.transformArcs_ = function(arcs, scale, translate) {
/**
* Apply a linear transform to an arc. The provided arc is modified in place.
*
* @param {ol.geom.VertexArray} arc Arc.
* @param {ol.CoordinateArray} arc Arc.
* @param {Array.<number>} scale Scale for each dimension.
* @param {Array.<number>} translate Translation for each dimension.
* @private