Rename _ol_geom_LinearRing_ to LinearRing

This commit is contained in:
Tim Schaub
2017-12-14 09:01:39 -07:00
parent 504368369c
commit 64a0d40361
9 changed files with 51 additions and 51 deletions
+13 -13
View File
@@ -2,7 +2,7 @@ import _ol_Feature_ from '../../../../src/ol/Feature.js';
import * as _ol_extent_ from '../../../../src/ol/extent.js';
import _ol_format_EsriJSON_ from '../../../../src/ol/format/EsriJSON.js';
import LineString from '../../../../src/ol/geom/LineString.js';
import _ol_geom_LinearRing_ from '../../../../src/ol/geom/LinearRing.js';
import LinearRing from '../../../../src/ol/geom/LinearRing.js';
import MultiLineString from '../../../../src/ol/geom/MultiLineString.js';
import MultiPoint from '../../../../src/ol/geom/MultiPoint.js';
import MultiPolygon from '../../../../src/ol/geom/MultiPolygon.js';
@@ -563,9 +563,9 @@ describe('ol.format.EsriJSON', function() {
var rings = obj.getLinearRings();
expect(rings.length).to.be(3);
expect(rings[0].getCoordinates()[0].length).to.equal(2);
expect(rings[0]).to.be.a(_ol_geom_LinearRing_);
expect(rings[1]).to.be.a(_ol_geom_LinearRing_);
expect(rings[2]).to.be.a(_ol_geom_LinearRing_);
expect(rings[0]).to.be.a(LinearRing);
expect(rings[1]).to.be.a(LinearRing);
expect(rings[2]).to.be.a(LinearRing);
});
it('parses XYZ polygon', function() {
@@ -582,9 +582,9 @@ describe('ol.format.EsriJSON', function() {
var rings = obj.getLinearRings();
expect(rings.length).to.be(3);
expect(rings[0].getCoordinates()[0].length).to.equal(3);
expect(rings[0]).to.be.a(_ol_geom_LinearRing_);
expect(rings[1]).to.be.a(_ol_geom_LinearRing_);
expect(rings[2]).to.be.a(_ol_geom_LinearRing_);
expect(rings[0]).to.be.a(LinearRing);
expect(rings[1]).to.be.a(LinearRing);
expect(rings[2]).to.be.a(LinearRing);
});
it('parses XYM polygon', function() {
@@ -601,9 +601,9 @@ describe('ol.format.EsriJSON', function() {
var rings = obj.getLinearRings();
expect(rings.length).to.be(3);
expect(rings[0].getCoordinates()[0].length).to.equal(3);
expect(rings[0]).to.be.a(_ol_geom_LinearRing_);
expect(rings[1]).to.be.a(_ol_geom_LinearRing_);
expect(rings[2]).to.be.a(_ol_geom_LinearRing_);
expect(rings[0]).to.be.a(LinearRing);
expect(rings[1]).to.be.a(LinearRing);
expect(rings[2]).to.be.a(LinearRing);
});
it('parses XYZM polygon', function() {
@@ -630,9 +630,9 @@ describe('ol.format.EsriJSON', function() {
var rings = obj.getLinearRings();
expect(rings.length).to.be(3);
expect(rings[0].getCoordinates()[0].length).to.equal(4);
expect(rings[0]).to.be.a(_ol_geom_LinearRing_);
expect(rings[1]).to.be.a(_ol_geom_LinearRing_);
expect(rings[2]).to.be.a(_ol_geom_LinearRing_);
expect(rings[0]).to.be.a(LinearRing);
expect(rings[1]).to.be.a(LinearRing);
expect(rings[2]).to.be.a(LinearRing);
});
it('parses XY multipolygon', function() {
+4 -4
View File
@@ -4,7 +4,7 @@ import _ol_format_GeoJSON_ from '../../../../src/ol/format/GeoJSON.js';
import Circle from '../../../../src/ol/geom/Circle.js';
import GeometryCollection from '../../../../src/ol/geom/GeometryCollection.js';
import LineString from '../../../../src/ol/geom/LineString.js';
import _ol_geom_LinearRing_ from '../../../../src/ol/geom/LinearRing.js';
import LinearRing from '../../../../src/ol/geom/LinearRing.js';
import MultiPolygon from '../../../../src/ol/geom/MultiPolygon.js';
import Point from '../../../../src/ol/geom/Point.js';
import Polygon from '../../../../src/ol/geom/Polygon.js';
@@ -399,9 +399,9 @@ describe('ol.format.GeoJSON', function() {
expect(obj.getLayout()).to.eql('XY');
var rings = obj.getLinearRings();
expect(rings.length).to.be(3);
expect(rings[0]).to.be.a(_ol_geom_LinearRing_);
expect(rings[1]).to.be.a(_ol_geom_LinearRing_);
expect(rings[2]).to.be.a(_ol_geom_LinearRing_);
expect(rings[0]).to.be.a(LinearRing);
expect(rings[1]).to.be.a(LinearRing);
expect(rings[2]).to.be.a(LinearRing);
});
it('parses geometry collection', function() {
+2 -2
View File
@@ -2,7 +2,7 @@ import _ol_Feature_ from '../../../../src/ol/Feature.js';
import _ol_format_GML_ from '../../../../src/ol/format/GML.js';
import _ol_format_GML2_ from '../../../../src/ol/format/GML2.js';
import LineString from '../../../../src/ol/geom/LineString.js';
import _ol_geom_LinearRing_ from '../../../../src/ol/geom/LinearRing.js';
import LinearRing from '../../../../src/ol/geom/LinearRing.js';
import MultiLineString from '../../../../src/ol/geom/MultiLineString.js';
import MultiPoint from '../../../../src/ol/geom/MultiPoint.js';
import MultiPolygon from '../../../../src/ol/geom/MultiPolygon.js';
@@ -578,7 +578,7 @@ describe('ol.format.GML3', function() {
' <gml:posList srsDimension="2">1 2 3 4 5 6 1 2</gml:posList>' +
'</gml:LinearRing>';
var g = readGeometry(format, text);
expect(g).to.be.an(_ol_geom_LinearRing_);
expect(g).to.be.an(LinearRing);
expect(g.getCoordinates()).to.eql(
[[1, 2, 0], [3, 4, 0], [5, 6, 0], [1, 2, 0]]);
var serialized = format.writeGeometryNode(g);
+5 -5
View File
@@ -4,7 +4,7 @@ import _ol_format_GeoJSON_ from '../../../../src/ol/format/GeoJSON.js';
import _ol_format_KML_ from '../../../../src/ol/format/KML.js';
import GeometryCollection from '../../../../src/ol/geom/GeometryCollection.js';
import LineString from '../../../../src/ol/geom/LineString.js';
import _ol_geom_LinearRing_ from '../../../../src/ol/geom/LinearRing.js';
import LinearRing from '../../../../src/ol/geom/LinearRing.js';
import MultiLineString from '../../../../src/ol/geom/MultiLineString.js';
import MultiPoint from '../../../../src/ol/geom/MultiPoint.js';
import MultiPolygon from '../../../../src/ol/geom/MultiPolygon.js';
@@ -559,7 +559,7 @@ describe('ol.format.KML', function() {
it('can write XY LinearRing geometries', function() {
var layout = 'XY';
var linearRing = new _ol_geom_LinearRing_(
var linearRing = new LinearRing(
[[1, 2], [3, 4], [1, 2]], layout);
var features = [new _ol_Feature_(linearRing)];
var node = format.writeFeaturesNode(features);
@@ -580,7 +580,7 @@ describe('ol.format.KML', function() {
it('can write XYZ LinearRing geometries', function() {
var layout = 'XYZ';
var linearRing = new _ol_geom_LinearRing_(
var linearRing = new LinearRing(
[[1, 2, 3], [4, 5, 6], [1, 2, 3]], layout);
var features = [new _ol_Feature_(linearRing)];
var node = format.writeFeaturesNode(features);
@@ -601,7 +601,7 @@ describe('ol.format.KML', function() {
it('can write XYM LinearRing geometries', function() {
var layout = 'XYM';
var linearRing = new _ol_geom_LinearRing_(
var linearRing = new LinearRing(
[[1, 2, 100], [3, 4, 200], [1, 2, 100]], layout);
var features = [new _ol_Feature_(linearRing)];
var node = format.writeFeaturesNode(features);
@@ -622,7 +622,7 @@ describe('ol.format.KML', function() {
it('can write XYZM LinearRing geometries', function() {
var layout = 'XYZM';
var linearRing = new _ol_geom_LinearRing_(
var linearRing = new LinearRing(
[[1, 2, 3, 100], [4, 5, 6, 200], [1, 2, 3, 100]], layout);
var features = [new _ol_Feature_(linearRing)];
var node = format.writeFeaturesNode(features);
+5 -5
View File
@@ -1,6 +1,6 @@
import * as _ol_extent_ from '../../../../src/ol/extent.js';
import Circle from '../../../../src/ol/geom/Circle.js';
import _ol_geom_LinearRing_ from '../../../../src/ol/geom/LinearRing.js';
import LinearRing from '../../../../src/ol/geom/LinearRing.js';
import Polygon from '../../../../src/ol/geom/Polygon.js';
@@ -41,11 +41,11 @@ describe('ol.geom.Polygon', function() {
it('can append linear rings', function() {
polygon.appendLinearRing(
new _ol_geom_LinearRing_([[1, 2], [3, 4], [5, 6]]));
new LinearRing([[1, 2], [3, 4], [5, 6]]));
expect(polygon.getCoordinates()).to.eql(
[[[1, 2], [3, 4], [5, 6]]]);
polygon.appendLinearRing(
new _ol_geom_LinearRing_([[7, 8], [9, 10], [11, 12]]));
new LinearRing([[7, 8], [9, 10], [11, 12]]));
expect(polygon.getCoordinates()).to.eql(
[[[1, 2], [3, 4], [5, 6]], [[7, 8], [9, 10], [11, 12]]]);
});
@@ -95,9 +95,9 @@ describe('ol.geom.Polygon', function() {
var linearRings = polygon.getLinearRings();
expect(linearRings).to.be.an(Array);
expect(linearRings).to.have.length(2);
expect(linearRings[0]).to.be.an(_ol_geom_LinearRing_);
expect(linearRings[0]).to.be.an(LinearRing);
expect(linearRings[0].getCoordinates()).to.eql(outerRing);
expect(linearRings[1]).to.be.an(_ol_geom_LinearRing_);
expect(linearRings[1]).to.be.an(LinearRing);
expect(linearRings[1].getCoordinates()).to.eql(innerRing);
});