@@ -16,8 +16,8 @@ import MultiPoint from '../geom/MultiPoint.js';
|
||||
import MultiPolygon from '../geom/MultiPolygon.js';
|
||||
import Point from '../geom/Point.js';
|
||||
import Polygon from '../geom/Polygon.js';
|
||||
import _ol_geom_flat_deflate_ from '../geom/flat/deflate.js';
|
||||
import _ol_geom_flat_orient_ from '../geom/flat/orient.js';
|
||||
import {deflateCoordinates} from '../geom/flat/deflate.js';
|
||||
import {linearRingIsClockwise} from '../geom/flat/orient.js';
|
||||
import {assign, isEmpty} from '../obj.js';
|
||||
import {get as getProjection} from '../proj.js';
|
||||
|
||||
@@ -132,9 +132,9 @@ function convertRings(rings, layout) {
|
||||
let i, ii;
|
||||
for (i = 0, ii = rings.length; i < ii; ++i) {
|
||||
flatRing.length = 0;
|
||||
_ol_geom_flat_deflate_.coordinates(flatRing, 0, rings[i], layout.length);
|
||||
deflateCoordinates(flatRing, 0, rings[i], layout.length);
|
||||
// is this ring an outer ring? is it clockwise?
|
||||
const clockwise = _ol_geom_flat_orient_.linearRingIsClockwise(flatRing, 0,
|
||||
const clockwise = linearRingIsClockwise(flatRing, 0,
|
||||
flatRing.length, layout.length);
|
||||
if (clockwise) {
|
||||
outerRings.push([rings[i]]);
|
||||
|
||||
@@ -16,7 +16,7 @@ import MultiPoint from '../geom/MultiPoint.js';
|
||||
import MultiPolygon from '../geom/MultiPolygon.js';
|
||||
import Point from '../geom/Point.js';
|
||||
import Polygon from '../geom/Polygon.js';
|
||||
import _ol_geom_flat_orient_ from '../geom/flat/orient.js';
|
||||
import {linearRingIsClockwise} from '../geom/flat/orient.js';
|
||||
import Projection from '../proj/Projection.js';
|
||||
import Units from '../proj/Units.js';
|
||||
import RenderFeature from '../render/Feature.js';
|
||||
@@ -309,7 +309,7 @@ MVT.prototype.createFeature_ = function(pbf, rawFeature, opt_options) {
|
||||
let prevEndIndex = 0;
|
||||
for (let i = 0, ii = ends.length; i < ii; ++i) {
|
||||
const end = ends[i];
|
||||
if (!_ol_geom_flat_orient_.linearRingIsClockwise(flatCoordinates, offset, end, 2)) {
|
||||
if (!linearRingIsClockwise(flatCoordinates, offset, end, 2)) {
|
||||
endss.push(ends.slice(prevEndIndex, i));
|
||||
prevEndIndex = i;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import GeometryLayout from '../geom/GeometryLayout.js';
|
||||
import LineString from '../geom/LineString.js';
|
||||
import {getStrideForLayout} from '../geom/SimpleGeometry.js';
|
||||
import {flipXY} from '../geom/flat/flip.js';
|
||||
import _ol_geom_flat_inflate_ from '../geom/flat/inflate.js';
|
||||
import {inflateCoordinates} from '../geom/flat/inflate.js';
|
||||
import {get as getProjection} from '../proj.js';
|
||||
|
||||
/**
|
||||
@@ -327,7 +327,7 @@ Polyline.prototype.readGeometryFromText = function(text, opt_options) {
|
||||
const stride = getStrideForLayout(this.geometryLayout_);
|
||||
const flatCoordinates = decodeDeltas(text, stride, this.factor_);
|
||||
flipXY(flatCoordinates, 0, flatCoordinates.length, stride, flatCoordinates);
|
||||
const coordinates = _ol_geom_flat_inflate_.coordinates(
|
||||
const coordinates = inflateCoordinates(
|
||||
flatCoordinates, 0, flatCoordinates.length, stride);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user