Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
contained = d3Geo.geoContains(sampleExtendedGeometryCollection, [0, 0]);
contained = d3Geo.geoContains(sampleFeature, [0, 0]);
contained = d3Geo.geoContains(sampleExtendedFeature1, [0, 0]);
contained = d3Geo.geoContains(sampleExtendedFeature2, [0, 0]);
contained = d3Geo.geoContains(sampleFeatureCollection, [0, 0]);
contained = d3Geo.geoContains(sampleExtendedFeatureCollection, [0, 0]);
// geoDistance(...) =======================================================
const distance: number = d3Geo.geoDistance([54, 2], [53, 1]);
// geoLength(...) =========================================================
let length: number = d3Geo.geoLength(samplePolygon);
length = d3Geo.geoLength(sampleSphere);
length = d3Geo.geoLength(sampleGeometryCollection);
length = d3Geo.geoLength(sampleExtendedGeometryCollection);
length = d3Geo.geoLength(sampleFeature);
length = d3Geo.geoLength(sampleExtendedFeature1);
length = d3Geo.geoLength(sampleExtendedFeature2);
length = d3Geo.geoLength(sampleFeatureCollection);
length = d3Geo.geoLength(sampleExtendedFeatureCollection);
// geoInterpolate(...) ====================================================
const interpolateFct: (t: number) => [number, number] = d3Geo.geoInterpolate([54, 2], [53, 1]);
// geoRotation(...) =======================================================
// create rotation -----------------------------------------------------
const rotation: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45]);
contained = d3Geo.geoContains(sampleFeatureCollection, [0, 0]);
contained = d3Geo.geoContains(sampleExtendedFeatureCollection, [0, 0]);
// geoDistance(...) =======================================================
const distance: number = d3Geo.geoDistance([54, 2], [53, 1]);
// geoLength(...) =========================================================
let length: number = d3Geo.geoLength(samplePolygon);
length = d3Geo.geoLength(sampleSphere);
length = d3Geo.geoLength(sampleGeometryCollection);
length = d3Geo.geoLength(sampleExtendedGeometryCollection);
length = d3Geo.geoLength(sampleFeature);
length = d3Geo.geoLength(sampleExtendedFeature1);
length = d3Geo.geoLength(sampleExtendedFeature2);
length = d3Geo.geoLength(sampleFeatureCollection);
length = d3Geo.geoLength(sampleExtendedFeatureCollection);
// geoInterpolate(...) ====================================================
const interpolateFct: (t: number) => [number, number] = d3Geo.geoInterpolate([54, 2], [53, 1]);
// geoRotation(...) =======================================================
// create rotation -----------------------------------------------------
const rotation: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45]);
const rotation2: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45, 27.5]);
// use rotation --------------------------------------------------------
contained = d3Geo.geoContains(sampleFeatureCollection, [0, 0]);
contained = d3Geo.geoContains(sampleExtendedFeatureCollection, [0, 0]);
// geoDistance(...) =======================================================
const distance: number = d3Geo.geoDistance([54, 2], [53, 1]);
// geoLength(...) =========================================================
let length: number = d3Geo.geoLength(samplePolygon);
length = d3Geo.geoLength(sampleSphere);
length = d3Geo.geoLength(sampleGeometryCollection);
length = d3Geo.geoLength(sampleExtendedGeometryCollection);
length = d3Geo.geoLength(sampleFeature);
length = d3Geo.geoLength(sampleExtendedFeature1);
length = d3Geo.geoLength(sampleExtendedFeature2);
length = d3Geo.geoLength(sampleFeatureCollection);
length = d3Geo.geoLength(sampleExtendedFeatureCollection);
// geoInterpolate(...) ====================================================
const interpolateFct: (t: number) => [number, number] = d3Geo.geoInterpolate([54, 2], [53, 1]);
// geoRotation(...) =======================================================
// create rotation -----------------------------------------------------
const rotation: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45]);
const rotation2: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45, 27.5]);
// use rotation --------------------------------------------------------
// geoDistance(...) =======================================================
const distance: number = d3Geo.geoDistance([54, 2], [53, 1]);
// geoLength(...) =========================================================
let length: number = d3Geo.geoLength(samplePolygon);
length = d3Geo.geoLength(sampleSphere);
length = d3Geo.geoLength(sampleGeometryCollection);
length = d3Geo.geoLength(sampleExtendedGeometryCollection);
length = d3Geo.geoLength(sampleFeature);
length = d3Geo.geoLength(sampleExtendedFeature1);
length = d3Geo.geoLength(sampleExtendedFeature2);
length = d3Geo.geoLength(sampleFeatureCollection);
length = d3Geo.geoLength(sampleExtendedFeatureCollection);
// geoInterpolate(...) ====================================================
const interpolateFct: (t: number) => [number, number] = d3Geo.geoInterpolate([54, 2], [53, 1]);
// geoRotation(...) =======================================================
// create rotation -----------------------------------------------------
const rotation: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45]);
const rotation2: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45, 27.5]);
// use rotation --------------------------------------------------------
const point: [number, number] = rotation([54, 2]);
const inverted: [number, number] = rotation.invert([54, 2]);
contained = d3Geo.geoContains(sampleExtendedFeature1, [0, 0]);
contained = d3Geo.geoContains(sampleExtendedFeature2, [0, 0]);
contained = d3Geo.geoContains(sampleFeatureCollection, [0, 0]);
contained = d3Geo.geoContains(sampleExtendedFeatureCollection, [0, 0]);
// geoDistance(...) =======================================================
const distance: number = d3Geo.geoDistance([54, 2], [53, 1]);
// geoLength(...) =========================================================
let length: number = d3Geo.geoLength(samplePolygon);
length = d3Geo.geoLength(sampleSphere);
length = d3Geo.geoLength(sampleGeometryCollection);
length = d3Geo.geoLength(sampleExtendedGeometryCollection);
length = d3Geo.geoLength(sampleFeature);
length = d3Geo.geoLength(sampleExtendedFeature1);
length = d3Geo.geoLength(sampleExtendedFeature2);
length = d3Geo.geoLength(sampleFeatureCollection);
length = d3Geo.geoLength(sampleExtendedFeatureCollection);
// geoInterpolate(...) ====================================================
const interpolateFct: (t: number) => [number, number] = d3Geo.geoInterpolate([54, 2], [53, 1]);
// geoRotation(...) =======================================================
// create rotation -----------------------------------------------------
const rotation: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45]);
const rotation2: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45, 27.5]);
contained = d3Geo.geoContains(sampleExtendedFeature2, [0, 0]);
contained = d3Geo.geoContains(sampleFeatureCollection, [0, 0]);
contained = d3Geo.geoContains(sampleExtendedFeatureCollection, [0, 0]);
// geoDistance(...) =======================================================
const distance: number = d3Geo.geoDistance([54, 2], [53, 1]);
// geoLength(...) =========================================================
let length: number = d3Geo.geoLength(samplePolygon);
length = d3Geo.geoLength(sampleSphere);
length = d3Geo.geoLength(sampleGeometryCollection);
length = d3Geo.geoLength(sampleExtendedGeometryCollection);
length = d3Geo.geoLength(sampleFeature);
length = d3Geo.geoLength(sampleExtendedFeature1);
length = d3Geo.geoLength(sampleExtendedFeature2);
length = d3Geo.geoLength(sampleFeatureCollection);
length = d3Geo.geoLength(sampleExtendedFeatureCollection);
// geoInterpolate(...) ====================================================
const interpolateFct: (t: number) => [number, number] = d3Geo.geoInterpolate([54, 2], [53, 1]);
// geoRotation(...) =======================================================
// create rotation -----------------------------------------------------
const rotation: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45]);
const rotation2: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45, 27.5]);
// use rotation --------------------------------------------------------
contained = d3Geo.geoContains(sampleSphere, [0, 0]);
contained = d3Geo.geoContains(sampleGeometryCollection, [0, 0]);
contained = d3Geo.geoContains(sampleExtendedGeometryCollection, [0, 0]);
contained = d3Geo.geoContains(sampleFeature, [0, 0]);
contained = d3Geo.geoContains(sampleExtendedFeature1, [0, 0]);
contained = d3Geo.geoContains(sampleExtendedFeature2, [0, 0]);
contained = d3Geo.geoContains(sampleFeatureCollection, [0, 0]);
contained = d3Geo.geoContains(sampleExtendedFeatureCollection, [0, 0]);
// geoDistance(...) =======================================================
const distance: number = d3Geo.geoDistance([54, 2], [53, 1]);
// geoLength(...) =========================================================
let length: number = d3Geo.geoLength(samplePolygon);
length = d3Geo.geoLength(sampleSphere);
length = d3Geo.geoLength(sampleGeometryCollection);
length = d3Geo.geoLength(sampleExtendedGeometryCollection);
length = d3Geo.geoLength(sampleFeature);
length = d3Geo.geoLength(sampleExtendedFeature1);
length = d3Geo.geoLength(sampleExtendedFeature2);
length = d3Geo.geoLength(sampleFeatureCollection);
length = d3Geo.geoLength(sampleExtendedFeatureCollection);
// geoInterpolate(...) ====================================================
const interpolateFct: (t: number) => [number, number] = d3Geo.geoInterpolate([54, 2], [53, 1]);
// geoRotation(...) =======================================================
// create rotation -----------------------------------------------------
if (!singular) {
coordItem = list
.append('li')
.text(t('info_panels.measurement.center') + ':');
coordItem.append('span')
.text(dmsCoordinatePair(center));
coordItem.append('span')
.text(decimalCoordinatePair(center));
return;
}
// single selected feature, display details..
if (geometry === 'line' || geometry === 'area') {
var closed = (entity.type === 'relation') || (entity.isClosed() && !entity.isDegenerate());
var feature = entity.asGeoJSON(resolver);
var length = radiansToMeters(d3_geoLength(toLineString(feature)));
var lengthLabel = t('info_panels.measurement.' + (closed ? 'perimeter' : 'length'));
var centroid = d3_geoCentroid(feature);
list
.append('li')
.text(t('info_panels.measurement.geometry') + ':')
.append('span')
.text(
closed ? t('info_panels.measurement.closed_' + geometry) : t('geometry.' + geometry)
);
if (entity.type !== 'relation') {
list
.append('li')
.text(t('info_panels.measurement.node_count') + ':')
.append('span')
geoLengthByName(name) {
return geoLength(this.geoFeatureByName(name));
},
geoContains(feature, position/* [longitude, latitude] */) {
} = this.props;
const { pressed, hover } = this.state;
const scale = preserveMarkerAspect ? ` scale(${1 / zoom})` : '';
const buildLineString = coordinates => ({
type: 'Feature',
geometry: {
type: 'LineString',
coordinates: [projection.invert([width / 2, height / 2]), coordinates]
}
});
const startLineString = buildLineString(arc.coordinates.start);
const endLineString = buildLineString(arc.coordinates.end);
const isHidden = geoLength(startLineString) > 1.5708 || geoLength(endLineString) > 1.5708;
const start = projection(arc.coordinates.start);
const end = projection(arc.coordinates.end);
const path = buildPath ? buildPath(start, end, arc) : `M ${start.join(' ')} L ${end.join(' ')}`;
return (