forked from Turfjs/turf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc3ae8e
commit ed8bf67
Showing
8 changed files
with
126 additions
and
72 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
import { | ||
LineString, | ||
MultiLineString, | ||
Polygon, | ||
MultiPolygon, | ||
Point, | ||
FeatureCollection, | ||
Feature | ||
} from '@turf/helpers' | ||
|
||
import { Feature, FeatureCollection, LineString, MultiLineString, MultiPolygon, Point, Polygon } from "@turf/helpers"; | ||
/** | ||
* http://turfjs.org/docs/#kinks | ||
* Takes a {@link LineString|linestring}, {@link MultiLineString|multi-linestring}, | ||
* {@link MultiPolygon|multi-polygon} or {@link Polygon|polygon} and | ||
* returns {@link Point|points} at all self-intersections. | ||
* | ||
* @name kinks | ||
* @param {Feature<LineString|MultiLineString|MultiPolygon|Polygon>} featureIn input feature | ||
* @returns {FeatureCollection<Point>} self-intersections | ||
* @example | ||
* var poly = turf.polygon([[ | ||
* [-12.034835, 8.901183], | ||
* [-12.060413, 8.899826], | ||
* [-12.03638, 8.873199], | ||
* [-12.059383, 8.871418], | ||
* [-12.034835, 8.901183] | ||
* ]]); | ||
* | ||
* var kinks = turf.kinks(poly); | ||
* | ||
* //addToMap | ||
* var addToMap = [poly, kinks] | ||
*/ | ||
export default function kinks<T extends LineString | MultiLineString | Polygon | MultiPolygon>( | ||
featureIn: Feature<T> | T | ||
): FeatureCollection<Point>; | ||
export default function kinks<T extends LineString | MultiLineString | Polygon | MultiPolygon>(featureIn: Feature<T> | T): FeatureCollection<Point>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"compilerOptions": { | ||
/* Basic Options */ | ||
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ | ||
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ | ||
"declaration": true, /* Generates corresponding '.d.ts' file. */ | ||
|
||
/* Strict Type-Checking Options */ | ||
"strict": true, /* Enable all strict type-checking options. */ | ||
|
||
/* Module Resolution Options */ | ||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ | ||
}, | ||
"files": [ | ||
"index.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"defaultSeverity": "error", | ||
"extends": [ | ||
"tslint:recommended" | ||
], | ||
"jsRules": {}, | ||
"rules": { | ||
"object-literal-sort-keys": false, | ||
"max-line-length": false | ||
}, | ||
"rulesDirectory": [] | ||
} |