Go to the source code of this file.
|
| #define | EDGE_VERSION 1 |
| |
| #define | EDGE_REVISION 3 |
| |
| #define | EDGE_MODIFICATION 0 |
| |
| #define | NDPluginEdgeLowThresholdString "LOW_THRESHOLD" /* (asynFloat32, r/w) Canny sensitivity */ |
| |
| #define | NDPluginEdgeThresholdRatioString "THRESHOLD_RATIO" /* (asynFloat32, r/w) low threshold * ratio = high threshold */ |
| |
| #define | NDPluginEdgeVerticalFoundString "VERTICAL_FOUND" /* (asynInt32, r/o) 1 we found it, 0 not */ |
| |
| #define | NDPluginEdgeTopEdgeFoundString "TOP_EDGE_FOUND" /* (asynInt32, r/o) 1 we found it, 0 not */ |
| |
| #define | NDPluginEdgeTopPixelString "TOP_PIXEL" /* (asynInt32, r/o) index of pixel or -1 if not found */ |
| |
| #define | NDPluginEdgeBottomEdgeFoundString "BOTTOM_EDGE_FOUND" /* (asynInt32, r/o) 1 we found it, 0 not */ |
| |
| #define | NDPluginEdgeBottomPixelString "BOTTOM_PIXEL" /* (asynInt32, r/o) index of pixel or -1 if not found */ |
| |
| #define | NDPluginEdgeVerticalCenterString "VERTICAL_CENTER" /* (asynFloat64, r/o) average of vertical positions */ |
| |
| #define | NDPluginEdgeVerticalSizeString "VERTICAL_SIZE" /* (asynInt32, r/o) Differance between top and bottom */ |
| |
| #define | NDPluginEdgeHorizontalFoundString "HORIZONTAL_FOUND" /* (asynInt32, r/o) 1 we found it, 0 we did not */ |
| |
| #define | NDPluginEdgeLeftEdgeFoundString "LEFT_EDGE_FOUND" /* (asynInt32, r/o) 1 of we found it, 0 if not */ |
| |
| #define | NDPluginEdgeLeftPixelString "LEFT_PIXEL" /* (asynInt32, r/o) index of pixel (-1 if not found */ |
| |
| #define | NDPluginEdgeRightEdgeFoundString "RIGHT_EDGE_FOUND" /* (asynInt32, r/o) 1 of we found it, 0 if not */ |
| |
| #define | NDPluginEdgeRightPixelString "RIGHT_PIXEL" /* (asynInt32, r/o) index of pixel (-1 if not found) */ |
| |
| #define | NDPluginEdgeHorizontalCenterString "HORIZONTAL_CENTER" /* (asynFloat64, r/o) average of horizontal positions */ |
| |
| #define | NDPluginEdgeHorizontalSizeString "HORIZONTAL_SIZE" /* (asynInt32, r/o) difference between left and right */ |
| |
| #define | FIRST_NDPLUGIN_EDGE_PARAM NDPluginEdgeLowThreshold |
| |
◆ EDGE_MODIFICATION
| #define EDGE_MODIFICATION 0 |
◆ EDGE_REVISION
◆ EDGE_VERSION
◆ FIRST_NDPLUGIN_EDGE_PARAM
| #define FIRST_NDPLUGIN_EDGE_PARAM NDPluginEdgeLowThreshold |
◆ NDPluginEdgeBottomEdgeFoundString
| #define NDPluginEdgeBottomEdgeFoundString "BOTTOM_EDGE_FOUND" /* (asynInt32, r/o) 1 we found it, 0 not */ |
◆ NDPluginEdgeBottomPixelString
| #define NDPluginEdgeBottomPixelString "BOTTOM_PIXEL" /* (asynInt32, r/o) index of pixel or -1 if not found */ |
◆ NDPluginEdgeHorizontalCenterString
| #define NDPluginEdgeHorizontalCenterString "HORIZONTAL_CENTER" /* (asynFloat64, r/o) average of horizontal positions */ |
◆ NDPluginEdgeHorizontalFoundString
| #define NDPluginEdgeHorizontalFoundString "HORIZONTAL_FOUND" /* (asynInt32, r/o) 1 we found it, 0 we did not */ |
◆ NDPluginEdgeHorizontalSizeString
| #define NDPluginEdgeHorizontalSizeString "HORIZONTAL_SIZE" /* (asynInt32, r/o) difference between left and right */ |
◆ NDPluginEdgeLeftEdgeFoundString
| #define NDPluginEdgeLeftEdgeFoundString "LEFT_EDGE_FOUND" /* (asynInt32, r/o) 1 of we found it, 0 if not */ |
◆ NDPluginEdgeLeftPixelString
| #define NDPluginEdgeLeftPixelString "LEFT_PIXEL" /* (asynInt32, r/o) index of pixel (-1 if not found */ |
◆ NDPluginEdgeLowThresholdString
| #define NDPluginEdgeLowThresholdString "LOW_THRESHOLD" /* (asynFloat32, r/w) Canny sensitivity */ |
◆ NDPluginEdgeRightEdgeFoundString
| #define NDPluginEdgeRightEdgeFoundString "RIGHT_EDGE_FOUND" /* (asynInt32, r/o) 1 of we found it, 0 if not */ |
◆ NDPluginEdgeRightPixelString
| #define NDPluginEdgeRightPixelString "RIGHT_PIXEL" /* (asynInt32, r/o) index of pixel (-1 if not found) */ |
◆ NDPluginEdgeThresholdRatioString
| #define NDPluginEdgeThresholdRatioString "THRESHOLD_RATIO" /* (asynFloat32, r/w) low threshold * ratio = high threshold */ |
◆ NDPluginEdgeTopEdgeFoundString
| #define NDPluginEdgeTopEdgeFoundString "TOP_EDGE_FOUND" /* (asynInt32, r/o) 1 we found it, 0 not */ |
◆ NDPluginEdgeTopPixelString
| #define NDPluginEdgeTopPixelString "TOP_PIXEL" /* (asynInt32, r/o) index of pixel or -1 if not found */ |
◆ NDPluginEdgeVerticalCenterString
| #define NDPluginEdgeVerticalCenterString "VERTICAL_CENTER" /* (asynFloat64, r/o) average of vertical positions */ |
◆ NDPluginEdgeVerticalFoundString
| #define NDPluginEdgeVerticalFoundString "VERTICAL_FOUND" /* (asynInt32, r/o) 1 we found it, 0 not */ |
◆ NDPluginEdgeVerticalSizeString
| #define NDPluginEdgeVerticalSizeString "VERTICAL_SIZE" /* (asynInt32, r/o) Differance between top and bottom */ |


Shipping
Warehouse Info
Edit your warehouse
Edit Warehouse
Shipping Methods
Add shipping methods to existing regions or create a new region
Add a Country


Using the HystrixDelegatingHandler
Overview
The HystrixDelegatingHandler
provides circuit breaker, bulkhead, and metrics support to HttpClient.
This handler would typically be the first in the pipeline:
RetryDelegatingHandler retryHandler = new RetryDelegatingHandler
{
InnerHandler = new HttpClientHandler()
};
HystrixDelegatingHandler hystrixHandler = new HystrixDelegatingHandler(commandKey, properties, retryHandler);
HttpClient httpClient = new HttpClient(hystrixHandler);
Timeouts
The HystrixDelegatingHandler
does not manage timeouts directly. Instead, use the HttpClient.Timeout property. When
the defined timeout expires, HystrixDelegatingHandler
will intercept the timeout and handle it appropriately.
httpClient.Timeout = TimeSpan.FromMilliseconds(properties.ExecutionTimeoutInMilliseconds);
HTTP Status Codes
Failures are counted and emitted for:
| Status | Reason | HystrixEvent | Comments |
|---|---|---|---|
| 408 | Request Timeout | HystrixEventType.TIMEOUT | |
| 504 | Gateway Timeout | HystrixEventType.TIMEOUT | |
| 403 | Forbidden | HystrixEventType.FAILURE | Some APIs, such as GitHub, return a 403 when a rate limit is reached |
| 429 | Too Many Requests | HystrixEventType.FAILURE | Proposed rate-limit status code. See RFC 6585 |
| >=500 | Server Errors | HystrixEventType.FAILURE | All server side errors |
Http 400 Bad Requests are not counted against failures but do emit a HystrixEventType.BAD_REQUEST
.
All other Http Status codes are ignored by NHystrix.
Exceptions and Fallback
Like the HystrixCommand
, the HystrixDelegatingHandler
does not
throw an exception on error nor does is allow exceptions to propagate up the stack. Rather, it relies
on the fallback implementation to handle error situations.
By default, when fallback is enabled, an HttpResponseMessage with a status code of [204 No Content]
will be returned and HystrixEventType.FALLBACK_MISSING
emitted if no fallback function is provided.
If fallback is disabled, exceptions will be bubbled up as in a typical message handler. Short-circuits and Semaphore-Rejections will return a [204 No Content].


Most B.C. residents, including those hit by 2018 storms, not prepared for outages: report - Barriere Star Journal
by Ashley WadhwaniCreate an emergency kit, BC Hydro says, and report all outages or downed lines
Just last year B.C. saw its most damaging winter storm on record but most residents still remain unprepared for storm-related power outages, according to a new BC Hydro report.
More than 750,000 hydro customers were left in the dark for a number of days last December, with the hardest hit region being the Cowichan Valley on Vancouver Island.
Although officials have cautioned that these kinds of severe weather events are only increasing in frequency, 60 per cent of people still aren’t prepared for storm-related power outages, the report says.
More than half still don’t have an emergency kit – including a majority of customers impacted by last years storm.
BC Hydro encourages customers to have a well-stocked emergency kit with supplies for each member of the household for at least 72 hours. An emergency kit should include basic supplies, such as a flashlight, first aid kit, any required medications and non-perishable food and bottled water.
As the winter weather makes its way across the province, the B.C. government is also urging residents to pull out all the stops in case of a weather emergency.
“Do you have a winterized road safety kit in your vehicle? Do you have flashlights and candles in case of a lengthy power outage?,” Jennifer Rice, Parliamentary Secretary for Emergency Preparedness, said in a statement. “Preparing for these


A child of five could understand this. Send someone to fetch a child of five.
Groucho Marx
Support my work on this extension via GitHub Sponsors (recurring) or PayPal (one-time).
Please use GitHub issues and Pull Requests.
If you do not have a GitHub-account, feel free to hit me up via email (see janraasch.com).
Tab Ahead by Jan Raasch is licensed under MIT.


Retrieves a description of the foreign key columns that reference the primary key columns of the given table.
Syntax
public java.sql.ResultSet getExportedKeys(java.lang.String cat, java.lang.String schema, java.lang.String table)
Parameters
cat
A String that contains the catalog name.
schema
A String that contains the schema name.
table
A String that contains the table name.
Return Value
A SQLServerResultSet object.
Exceptions
Remarks
This getExportedKeys method is specified by the getExportedKeys method in the java.sql.DatabaseMetaData interface.
The result set returned by the getExportedKeys method will contain the following information:
| Name | Type | Description |
|---|---|---|
|
PKTABLE_CAT |
String |
The name of the catalog that contains the primary key table. |
|
PKTABLE_SCHEM |
String |
The name of the schema of the primary key table. |
|
PKTABLE_NAME |
String |
The name of the primary key table. |
|
PKCOLUMN_NAME |
String |
The column name of the primary key. |
|
FKTABLE_CAT |
String |
The name of the catalog that contains the foreign key table. |
|
FKTABLE_SCHEM |
String |
The name of the schema of the foreign key table. |
|
FKTABLE_NAME |
String |
The name of the foreign key table. |
|
FKCOLUMN_NAME |
String |
The column name of the foreign key. |
|
KEY_SEQ |
short |
The sequence number of the column in a multicolumn primary key. |
|
UPDATE_RULE |
short |
The action applied to the foreign key when the SQL operation is an update. It can be one of the following values: importedKeyNoAction (3) importedKeyCascade (0) importedKeySetNull (2) importedKeySetDefault (4) importedKeyRestrict (1) |
|
DELETE_RULE |
short |
The action applied to the foreign key when the SQL operation is a deletion. It can be one of the following values: importedKeyNoAction (3) importedKeyCascade (0) importedKeySetNull (2) importedKeySetDefault (4) importedKeyRestrict (1) |
|
FK_NAME |
String |
The name of the foreign key. |
|
PK_NAME |
String |
The name of the primary key. |
|
DEFERRABILITY |
short |
Indicates if the evaluation of the foreign key constraint can be deferred until a commit. It can be one of the following values: importedKeyInitiallyDeferred (5) importedKeyInitiallyImmediate (6) importedKeyNotDeferrable (7) |
Example
The following example demonstrates how to use the getExportedKeys method to return information about all the foreign keys that reference the primary keys of the Person.Contact table in the SQL Server 2005 AdventureWorks sample database.
public static void executeGetExportedKeys(Connection con) { try { DatabaseMetaData dbmd = con.getMetaData(); ResultSet rs = dbmd.getExportedKeys("AdventureWorks", "Person", "Contact"); ResultSetMetaData rsmd = rs.getMetaData(); // Display the result set data. int cols = rsmd.getColumnCount(); while(rs.next()) { for (int i = 1; i <= cols; i++) { System.out.println(rs.getString(i)); } } rs.close(); } catch (Exception e) { e.printStackTrace(); } }


Members
bbox
Takes a set of features, calculates the bbox of all input features, and returns a bounding box.
- Source:
Example
var pt1 = turf.point([114.175329, 22.2524])
var pt2 = turf.point([114.170007, 22.267969])
var pt3 = turf.point([114.200649, 22.274641])
var pt4 = turf.point([114.200649, 22.274641])
var pt5 = turf.point([114.186744, 22.265745])
var features = turf.featureCollection([pt1, pt2, pt3, pt4, pt5])
var bbox = turf.bbox(features);
var bboxPolygon = turf.bboxPolygon(bbox);
//=bbox
//=bboxPolygon
bbox
Takes a set of features, calculates the bbox of all input features, and returns a bounding box.
- Source:
Example
var pt1 = turf.point([114.175329, 22.2524])
var pt2 = turf.point([114.170007, 22.267969])
var pt3 = turf.point([114.200649, 22.274641])
var pt4 = turf.point([114.200649, 22.274641])
var pt5 = turf.point([114.186744, 22.265745])
var features = turf.featureCollection([pt1, pt2, pt3, pt4, pt5])
var bbox = turf.bbox(features);
var bboxPolygon = turf.bboxPolygon(bbox);
//=bbox
//=bboxPolygon
bbox-clip
Takes a Feature and a bbox and clips the feature to the bbox using [lineclip](https://github.com/mapbox/lineclip).
May result in degenerate edges when clipping Polygons.
- Source:
Example
var bbox = [0, 0, 10, 10];
var poly = {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [[[2, 2], [8, 4], [12, 8], [3, 7], [2, 2]]]
}
}
var clipped = turf.bboxClip(poly, bbox);
//=clipped
bbox-clip
Takes a Feature and a bbox and clips the feature to the bbox using [lineclip](https://github.com/mapbox/lineclip).
May result in degenerate edges when clipping Polygons.
- Source:
Example
var bbox = [0, 0, 10, 10];
var poly = {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [[[2, 2], [8, 4], [12, 8], [3, 7], [2, 2]]]
}
}
var clipped = turf.bboxClip(poly, bbox);
//=clipped
bearingToAzimuth
Converts any bearing angle from the north line direction (positive clockwise)
and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
- Source:
center
Takes a Feature or FeatureCollection and returns the absolute center point of all features.
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-97.522259, 35.4691]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-97.502754, 35.463455]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-97.508269, 35.463245]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-97.516809, 35.465779]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-97.515372, 35.467072]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-97.509363, 35.463053]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-97.511123, 35.466601]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-97.518547, 35.469327]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-97.519706, 35.469659]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-97.517839, 35.466998]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-97.508678, 35.464942]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-97.514914, 35.463453]
}
}
]
};
var centerPt = turf.center(features);
centerPt.properties['marker-size'] = 'large';
centerPt.properties['marker-color'] = '#000';
var resultFeatures = features.features.concat(centerPt);
var result = {
"type": "FeatureCollection",
"features": resultFeatures
};
//=result
centroid
Takes one or more features and calculates the centroid using
the mean of all vertices.
This lessens the effect of small islands and artifacts when calculating
the centroid of a set of polygons.
- Source:
Example
var poly = {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [[
[105.818939,21.004714],
[105.818939,21.061754],
[105.890007,21.061754],
[105.890007,21.004714],
[105.818939,21.004714]
]]
}
};
var centroidPt = turf.centroid(poly);
var result = {
"type": "FeatureCollection",
"features": [poly, centroidPt]
};
//=result
collectionOf
Enforce expectations about types of FeatureCollection inputs for Turf.
Internally this uses geojsonType to judge geometry types.
- Source:
collectionOf
Enforce expectations about types of FeatureCollection inputs for Turf.
Internally this uses geojsonType to judge geometry types.
- Source:
collectionOf
Enforce expectations about types of FeatureCollection inputs for Turf.
Internally this uses geojsonType to judge geometry types.
- Source:
containsNumber
Checks if coordinates contains a number
- Source:
containsNumber
Checks if coordinates contains a number
- Source:
containsNumber
Checks if coordinates contains a number
- Source:
convex
Takes a Feature or a FeatureCollection and returns a convex hull Polygon.
Internally this uses
the [convex-hull](https://github.com/mikolalysenko/convex-hull) module that
implements a [monotone chain hull](http://en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/Convex_hull/Monotone_chain).
- Source:
Example
var points = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [10.195312, 43.755225]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [10.404052, 43.8424511]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [10.579833, 43.659924]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [10.360107, 43.516688]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [10.14038, 43.588348]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [10.195312, 43.755225]
}
}
]
};
var hull = turf.convex(points);
var resultFeatures = points.features.concat(hull);
var result = {
"type": "FeatureCollection",
"features": resultFeatures
};
//=result
coordAll
Get all coordinates from any GeoJSON object.
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
var coords = turf.coordAll(features);
//=coords
coordAll
Get all coordinates from any GeoJSON object.
- Source:
Example
var features = turf.featureCollection([
turf.point([26, 37], {foo: 'bar'}),
turf.point([36, 53], {hello: 'world'})
]);
var coords = turf.coordAll(features);
//= [[26, 37], [36, 53]]
coordAll
Get all coordinates from any GeoJSON object.
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
var coords = turf.coordAll(features);
//=coords
coordAll
Get all coordinates from any GeoJSON object.
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
var coords = turf.coordAll(features);
//=coords
coordEach
Iterate over coordinates in any GeoJSON object, similar to Array.forEach()
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.coordEach(features, function (currentCoords, currentIndex) {
//=currentCoords
//=currentIndex
});
coordEach
Iterate over coordinates in any GeoJSON object, similar to Array.forEach()
- Source:
Example
var features = turf.featureCollection([
turf.point([26, 37], {"foo": "bar"}),
turf.point([36, 53], {"hello": "world"})
]);
turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
//=currentCoord
//=coordIndex
//=featureIndex
//=multiFeatureIndex
//=geometryIndex
});
coordEach
Iterate over coordinates in any GeoJSON object, similar to Array.forEach()
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.coordEach(features, function (currentCoords, currentIndex) {
//=currentCoords
//=currentIndex
});
coordEach
Iterate over coordinates in any GeoJSON object, similar to Array.forEach()
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.coordEach(features, function (currentCoords, currentIndex) {
//=currentCoords
//=currentIndex
});
coordReduce
Reduce coordinates in any GeoJSON object, similar to Array.reduce()
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.coordReduce(features, function (previousValue, currentCoords, currentIndex) {
//=previousValue
//=currentCoords
//=currentIndex
return currentCoords;
});
coordReduce
Reduce coordinates in any GeoJSON object, similar to Array.reduce()
- Source:
Example
var features = turf.featureCollection([
turf.point([26, 37], {"foo": "bar"}),
turf.point([36, 53], {"hello": "world"})
]);
turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
//=previousValue
//=currentCoord
//=coordIndex
//=featureIndex
//=multiFeatureIndex
//=geometryIndex
return currentCoord;
});
coordReduce
Reduce coordinates in any GeoJSON object, similar to Array.reduce()
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.coordReduce(features, function (previousValue, currentCoords, currentIndex) {
//=previousValue
//=currentCoords
//=currentIndex
return currentCoords;
});
coordReduce
Reduce coordinates in any GeoJSON object, similar to Array.reduce()
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.coordReduce(features, function (previousValue, currentCoords, currentIndex) {
//=previousValue
//=currentCoords
//=currentIndex
return currentCoords;
});
degreesToRadians
Converts an angle in degrees to radians
- Source:
distanceToDegrees
Convert a distance measurement from a real-world unit into degrees
- Source:
distanceToDegrees
Convert a distance measurement from a real-world unit into degrees
- Source:
distanceToRadians
Convert a distance measurement from a real-world unit into radians
- Source:
distanceToRadians
Convert a distance measurement from a real-world unit into radians
- Source:
explode
Takes a feature or set of features and returns all positions as
points.
- Source:
Example
var poly = {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [[
[177.434692, -17.77517],
[177.402076, -17.779093],
[177.38079, -17.803937],
[177.40242, -17.826164],
[177.438468, -17.824857],
[177.454948, -17.796746],
[177.434692, -17.77517]
]]
}
};
var points = turf.explode(poly);
//=poly
//=points
feature
Wraps a GeoJSON Geometry in a GeoJSON Feature.
- Source:
Example
var geometry = {
"type": "Point",
"coordinates": [
67.5,
32.84267363195431
]
}
var feature = turf.feature(geometry);
//=feature
feature
Wraps a GeoJSON Geometry in a GeoJSON Feature.
- Source:
Example
var geometry = {
"type": "Point",
"coordinates": [
67.5,
32.84267363195431
]
}
var feature = turf.feature(geometry);
//=feature
feature
Wraps a GeoJSON Geometry in a GeoJSON Feature.
- Source:
Example
var geometry = {
"type": "Point",
"coordinates": [
67.5,
32.84267363195431
]
}
var feature = turf.feature(geometry);
//=feature
feature
Wraps a GeoJSON Geometry in a GeoJSON Feature.
- Source:
Example
var geometry = {
"type": "Point",
"coordinates": [110, 50]
};
var feature = turf.feature(geometry);
//=feature
featureCollection
Takes one or more Features and creates a FeatureCollection.
- Source:
Example
var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
var collection = turf.featureCollection([
locationA,
locationB,
locationC
]);
//=collection
featureCollection
Takes one or more Features and creates a FeatureCollection.
- Source:
Example
var features = [
turf.point([-75.343, 39.984], {name: 'Location A'}),
turf.point([-75.833, 39.284], {name: 'Location B'}),
turf.point([-75.534, 39.123], {name: 'Location C'})
];
var fc = turf.featureCollection(features);
//=fc
featureCollection
Takes one or more Features and creates a FeatureCollection.
- Source:
Example
var features = [
turf.point([-75.343, 39.984], {name: 'Location A'}),
turf.point([-75.833, 39.284], {name: 'Location B'}),
turf.point([-75.534, 39.123], {name: 'Location C'})
];
var fc = turf.featureCollection(features);
//=fc
featureCollection
Takes one or more Features and creates a FeatureCollection.
- Source:
Example
var features = [
turf.point([-75.343, 39.984], {name: 'Location A'}),
turf.point([-75.833, 39.284], {name: 'Location B'}),
turf.point([-75.534, 39.123], {name: 'Location C'})
];
var fc = turf.featureCollection(features);
//=fc
featureEach
Iterate over features in any GeoJSON object, similar to
Array.forEach.
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.featureEach(features, function (currentFeature, currentIndex) {
//=currentFeature
//=currentIndex
});
featureEach
Iterate over features in any GeoJSON object, similar to
Array.forEach.
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.featureEach(features, function (currentFeature, currentIndex) {
//=currentFeature
//=currentIndex
});
featureEach
Iterate over features in any GeoJSON object, similar to
Array.forEach.
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.featureEach(features, function (currentFeature, currentIndex) {
//=currentFeature
//=currentIndex
});
featureEach
Iterate over features in any GeoJSON object, similar to
Array.forEach.
- Source:
Example
var features = turf.featureCollection([
turf.point([26, 37], {foo: 'bar'}),
turf.point([36, 53], {hello: 'world'})
]);
turf.featureEach(features, function (currentFeature, featureIndex) {
//=currentFeature
//=featureIndex
});
featureOf
Enforce expectations about types of Feature inputs for Turf.
Internally this uses geojsonType to judge geometry types.
- Source:
featureOf
Enforce expectations about types of Feature inputs for Turf.
Internally this uses geojsonType to judge geometry types.
- Source:
featureOf
Enforce expectations about types of Feature inputs for Turf.
Internally this uses geojsonType to judge geometry types.
- Source:
featureReduce
Reduce features in any GeoJSON object, similar to Array.reduce().
- Source:
Example
var features = turf.featureCollection([
turf.point([26, 37], {"foo": "bar"}),
turf.point([36, 53], {"hello": "world"})
]);
turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {
//=previousValue
//=currentFeature
//=featureIndex
return currentFeature
});
featureReduce
Reduce features in any GeoJSON object, similar to Array.reduce().
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {"foo": "bar"},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {"hello": "world"},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.featureReduce(features, function (previousValue, currentFeature, currentIndex) {
//=previousValue
//=currentFeature
//=currentIndex
return currentFeature
});
featureReduce
Reduce features in any GeoJSON object, similar to Array.reduce().
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {"foo": "bar"},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {"hello": "world"},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.featureReduce(features, function (previousValue, currentFeature, currentIndex) {
//=previousValue
//=currentFeature
//=currentIndex
return currentFeature
});
featureReduce
Reduce features in any GeoJSON object, similar to Array.reduce().
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {"foo": "bar"},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {"hello": "world"},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.featureReduce(features, function (previousValue, currentFeature, currentIndex) {
//=previousValue
//=currentFeature
//=currentIndex
return currentFeature
});
flatten
Flattens any GeoJSON to a FeatureCollection inspired by [geojson-flatten](https://github.com/tmcw/geojson-flatten).
- Source:
Example
var geometry = {
"type": "MultiPolygon",
"coordinates": [
[[[102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0]]],
[[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]],
[[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]]]
]
};
var flattened = turf.flatten(geometry);
//=flattened
flatten
Flattens any GeoJSON to a FeatureCollection inspired by [geojson-flatten](https://github.com/tmcw/geojson-flatten).
- Source:
Example
var geometry = {
"type": "MultiPolygon",
"coordinates": [
[[[102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0]]],
[[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]],
[[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]]]
]
};
var flattened = turf.flatten(geometry);
//=flattened
flattenEach
Iterate over flattened features in any GeoJSON object, similar to
Array.forEach.
- Source:
Example
var features = turf.featureCollection([
turf.point([26, 37], {foo: 'bar'}),
turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
]);
turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {
//=currentFeature
//=featureIndex
//=multiFeatureIndex
});
flattenReduce
Reduce flattened features in any GeoJSON object, similar to Array.reduce().
- Source:
Example
var features = turf.featureCollection([
turf.point([26, 37], {foo: 'bar'}),
turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
]);
turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {
//=previousValue
//=currentFeature
//=featureIndex
//=multiFeatureIndex
return currentFeature
});
geojsonType
Enforce expectations about types of GeoJSON objects for Turf.
- Source:
geojsonType
Enforce expectations about types of GeoJSON objects for Turf.
- Source:
geojsonType
Enforce expectations about types of GeoJSON objects for Turf.
- Source:
geomEach
Iterate over each geometry in any GeoJSON object, similar to Array.forEach()
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.geomEach(features, function (currentGeometry, currentIndex) {
//=currentGeometry
//=currentIndex
});
geomEach
Iterate over each geometry in any GeoJSON object, similar to Array.forEach()
- Source:
Example
var features = turf.featureCollection([
turf.point([26, 37], {foo: 'bar'}),
turf.point([36, 53], {hello: 'world'})
]);
turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
//=currentGeometry
//=featureIndex
//=featureProperties
//=featureBBox
//=featureId
});
geomEach
Iterate over each geometry in any GeoJSON object, similar to Array.forEach()
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.geomEach(features, function (currentGeometry, currentIndex) {
//=currentGeometry
//=currentIndex
});
geomEach
Iterate over each geometry in any GeoJSON object, similar to Array.forEach()
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.geomEach(features, function (currentGeometry, currentIndex) {
//=currentGeometry
//=currentIndex
});
geometry
Creates a GeoJSON Geometry from a Geometry string type & coordinates.
For GeometryCollection type use `helpers.geometryCollection`
- Source:
Example
var type = 'Point';
var coordinates = [110, 50];
var geometry = turf.geometry(type, coordinates);
//=geometry
geometryCollection
Creates a Feature.<GeometryCollection> based on a
coordinate array. Properties can be added optionally.
- Source:
Example
var pt = {
"type": "Point",
"coordinates": [100, 0]
};
var line = {
"type": "LineString",
"coordinates": [ [101, 0], [102, 1] ]
};
var collection = turf.geometryCollection([pt, line]);
//=collection
geometryCollection
Creates a Feature.<GeometryCollection> based on a
coordinate array. Properties can be added optionally.
- Source:
Example
var pt = {
"type": "Point",
"coordinates": [100, 0]
};
var line = {
"type": "LineString",
"coordinates": [ [101, 0], [102, 1] ]
};
var collection = turf.geometryCollection([pt, line]);
//=collection
geometryCollection
Creates a Feature.<GeometryCollection> based on a
coordinate array. Properties can be added optionally.
- Source:
Example
var pt = {
"type": "Point",
"coordinates": [100, 0]
};
var line = {
"type": "LineString",
"coordinates": [ [101, 0], [102, 1] ]
};
var collection = turf.geometryCollection([pt, line]);
//=collection
geometryCollection
Creates a Feature.<GeometryCollection> based on a
coordinate array. Properties can be added optionally.
- Source:
Example
var pt = {
"type": "Point",
"coordinates": [100, 0]
};
var line = {
"type": "LineString",
"coordinates": [ [101, 0], [102, 1] ]
};
var collection = turf.geometryCollection([pt, line]);
//=collection
geomReduce
Reduce geometry in any GeoJSON object, similar to Array.reduce().
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {"foo": "bar"},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {"hello": "world"},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.geomReduce(features, function (previousValue, currentGeometry, currentIndex) {
//=previousValue
//=currentGeometry
//=currentIndex
return currentGeometry
});
geomReduce
Reduce geometry in any GeoJSON object, similar to Array.reduce().
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {"foo": "bar"},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {"hello": "world"},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.geomReduce(features, function (previousValue, currentGeometry, currentIndex) {
//=previousValue
//=currentGeometry
//=currentIndex
return currentGeometry
});
geomReduce
Reduce geometry in any GeoJSON object, similar to Array.reduce().
- Source:
Example
var features = turf.featureCollection([
turf.point([26, 37], {foo: 'bar'}),
turf.point([36, 53], {hello: 'world'})
]);
turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
//=previousValue
//=currentGeometry
//=featureIndex
//=featureProperties
//=featureBBox
//=featureId
return currentGeometry
});
geomReduce
Reduce geometry in any GeoJSON object, similar to Array.reduce().
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {"foo": "bar"},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {"hello": "world"},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.geomReduce(features, function (previousValue, currentGeometry, currentIndex) {
//=previousValue
//=currentGeometry
//=currentIndex
return currentGeometry
});
getCoord
Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.
- Source:
getCoord
Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.
- Source:
getCoord
Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.
- Source:
Example
var pt = turf.point([10, 10]);
var coord = turf.getCoord(pt);
//= [10, 10]
getCoords
Unwrap coordinates from a Feature, Geometry Object or an Array
- Source:
Example
var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);
var coords = turf.getCoords(poly);
//= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]
getCoords
Unwrap coordinates from a Feature, Geometry Object or an Array of numbers
- Source:
getCoords
Unwrap coordinates from a Feature, Geometry Object or an Array of numbers
- Source:
inside
Takes a Point and a Polygon or MultiPolygon and determines if the point resides inside the polygon. The polygon can
be convex or concave. The function accounts for holes.
- Source:
Example
var pt = turf.point([-77, 44]);
var poly = turf.polygon([[
[-81, 41],
[-81, 47],
[-72, 47],
[-72, 41],
[-81, 41]
]]);
var isInside = turf.inside(pt, poly);
//=isInside
lengthToDegrees
Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
- Source:
lengthToRadians
Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
- Source:
lineEach
Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,
similar to Array.forEach.
- Source:
Example
var multiLine = turf.multiLineString([
[[26, 37], [35, 45]],
[[36, 53], [38, 50], [41, 55]]
]);
turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
//=currentLine
//=featureIndex
//=multiFeatureIndex
//=geometryIndex
});
lineIntersect
Takes any LineString or Polygon GeoJSON and returns the intersecting point(s).
- Source:
Example
var line1 = {
"type": "Feature",
"properties": {},
"geometry": {
"type": "LineString",
"coordinates": [[126, -11], [129, -21]]
}
};
var line2 = {
"type": "Feature",
"properties": {},
"geometry": {
"type": "LineString",
"coordinates": [[123, -18], [131, -14]]
}
};
var points = turf.lineIntersect(line1, line2);
//= points
lineIntersect
Takes any LineString or Polygon GeoJSON and returns the intersecting point(s).
- Source:
Example
var line1 = {
"type": "Feature",
"properties": {},
"geometry": {
"type": "LineString",
"coordinates": [[126, -11], [129, -21]]
}
};
var line2 = {
"type": "Feature",
"properties": {},
"geometry": {
"type": "LineString",
"coordinates": [[123, -18], [131, -14]]
}
};
var points = turf.lineIntersect(line1, line2);
//= points
lineOffset
Takes a line and returns a line at offset by the specified distance.
- Source:
Example
var line = turf.lineString([[-83, 30], [-84, 36], [-78, 41]], { "stroke": "#F00" });
var offsetLine = turf.lineOffset(line, 2, {units: 'miles'});
//addToMap
var addToMap = [offsetLine, line]
offsetLine.properties.stroke = "#00F"
lineReduce
Reduce features in any GeoJSON object, similar to Array.reduce().
- Source:
Example
var multiPoly = turf.multiPolygon([
turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),
turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])
]);
turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
//=previousValue
//=currentLine
//=featureIndex
//=multiFeatureIndex
//=geometryIndex
return currentLine
});
lineSegment
Creates a FeatureCollection of 2-vertex LineString segments from a LineString, MultiLineString, MultiPolygon or Polygon.
- Source:
Example
var polygon = {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]
}
}
var segments = turf.lineSegment(polygon);
//=segments
lineSegment
Creates a FeatureCollection of 2-vertex LineString segments from a LineString, MultiLineString, MultiPolygon or Polygon.
- Source:
Example
var polygon = {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]
}
}
var segments = turf.lineSegment(polygon);
//=segments
lineString
Creates a LineString based on a
coordinate array. Properties can be added optionally.
- Source:
Example
var linestring1 = turf.lineString([
[-21.964416, 64.148203],
[-21.956176, 64.141316],
[-21.93901, 64.135924],
[-21.927337, 64.136673]
]);
var linestring2 = turf.lineString([
[-21.929054, 64.127985],
[-21.912918, 64.134726],
[-21.916007, 64.141016],
[-21.930084, 64.14446]
], {name: 'line 1', distance: 145});
//=linestring1
//=linestring2
lineString
Creates a LineString based on a
coordinate array. Properties can be added optionally.
- Source:
Example
var linestring1 = turf.lineString([
[-21.964416, 64.148203],
[-21.956176, 64.141316],
[-21.93901, 64.135924],
[-21.927337, 64.136673]
]);
var linestring2 = turf.lineString([
[-21.929054, 64.127985],
[-21.912918, 64.134726],
[-21.916007, 64.141016],
[-21.930084, 64.14446]
], {name: 'line 1', distance: 145});
//=linestring1
//=linestring2
lineString
Creates a LineString based on a
coordinate array. Properties can be added optionally.
- Source:
Example
var linestring1 = turf.lineString([
[-21.964416, 64.148203],
[-21.956176, 64.141316],
[-21.93901, 64.135924],
[-21.927337, 64.136673]
]);
var linestring2 = turf.lineString([
[-21.929054, 64.127985],
[-21.912918, 64.134726],
[-21.916007, 64.141016],
[-21.930084, 64.14446]
], {name: 'line 1', distance: 145});
//=linestring1
//=linestring2
lineString
Creates a LineString Feature from an Array of Positions.
- Source:
Example
var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});
//=linestring1
//=linestring2
lineStrings
Creates a LineString FeatureCollection from an Array of LineString coordinates.
- Source:
Example
var linestrings = turf.lineStrings([
[[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
[[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
]);
//=linestrings
multiLineString
Creates a Feature.<MultiLineString> based on a
coordinate array. Properties can be added optionally.
- Source:
Example
var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
//=multiLine
multiLineString
Creates a Feature.<MultiLineString> based on a
coordinate array. Properties can be added optionally.
- Source:
Example
var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
//=multiLine
multiLineString
Creates a Feature.<MultiLineString> based on a
coordinate array. Properties can be added optionally.
- Source:
Example
var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
//=multiLine
multiLineString
Creates a Feature.<MultiLineString> based on a
coordinate array. Properties can be added optionally.
- Source:
Example
var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
//=multiLine
multiPoint
Creates a Feature.<MultiPoint> based on a
coordinate array. Properties can be added optionally.
- Source:
Example
var multiPt = turf.multiPoint([[0,0],[10,10]]);
//=multiPt
multiPoint
Creates a Feature.<MultiPoint> based on a
coordinate array. Properties can be added optionally.
- Source:
Example
var multiPt = turf.multiPoint([[0,0],[10,10]]);
//=multiPt
multiPoint
Creates a Feature.<MultiPoint> based on a
coordinate array. Properties can be added optionally.
- Source:
Example
var multiPt = turf.multiPoint([[0,0],[10,10]]);
//=multiPt
multiPoint
Creates a Feature.<MultiPoint> based on a
coordinate array. Properties can be added optionally.
- Source:
Example
var multiPt = turf.multiPoint([[0,0],[10,10]]);
//=multiPt
multiPolygon
Creates a Feature.<MultiPolygon> based on a
coordinate array. Properties can be added optionally.
- Source:
Example
var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
//=multiPoly
multiPolygon
Creates a Feature.<MultiPolygon> based on a
coordinate array. Properties can be added optionally.
- Source:
Example
var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
//=multiPoly
multiPolygon
Creates a Feature.<MultiPolygon> based on a
coordinate array. Properties can be added optionally.
- Source:
Example
var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
//=multiPoly
multiPolygon
Creates a Feature.<MultiPolygon> based on a
coordinate array. Properties can be added optionally.
- Source:
Example
var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
//=multiPoly
point
Creates a Point Feature from a Position.
- Source:
Example
var point = turf.point([-75.343, 39.984]);
//=point
point
Takes coordinates and properties (optional) and returns a new Point feature.
- Source:
Example
var pt1 = turf.point([-75.343, 39.984]);
//=pt1
point
Takes coordinates and properties (optional) and returns a new Point feature.
- Source:
Example
var pt1 = turf.point([-75.343, 39.984]);
//=pt1
point
Takes coordinates and properties (optional) and returns a new Point feature.
- Source:
Example
var pt1 = turf.point([-75.343, 39.984]);
//=pt1
points
Creates a Point FeatureCollection from an Array of Point coordinates.
- Source:
Example
var points = turf.points([
[-75, 39],
[-80, 45],
[-78, 50]
]);
//=points
polygon
Takes an array of LinearRings and optionally an Object with properties and returns a Polygon feature.
- Source:
Example
var polygon = turf.polygon([[
[-2.275543, 53.464547],
[-2.275543, 53.489271],
[-2.215118, 53.489271],
[-2.215118, 53.464547],
[-2.275543, 53.464547]
]], { name: 'poly1', population: 400});
//=polygon
polygon
Takes an array of LinearRings and optionally an Object with properties and returns a Polygon feature.
- Source:
Example
var polygon = turf.polygon([[
[-2.275543, 53.464547],
[-2.275543, 53.489271],
[-2.215118, 53.489271],
[-2.215118, 53.464547],
[-2.275543, 53.464547]
]], { name: 'poly1', population: 400});
//=polygon
polygon
Creates a Polygon Feature from an Array of LinearRings.
- Source:
Example
var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
//=polygon
polygon
Takes an array of LinearRings and optionally an Object with properties and returns a Polygon feature.
- Source:
Example
var polygon = turf.polygon([[
[-2.275543, 53.464547],
[-2.275543, 53.489271],
[-2.215118, 53.489271],
[-2.215118, 53.464547],
[-2.275543, 53.464547]
]], { name: 'poly1', population: 400});
//=polygon
polygons
Creates a Polygon FeatureCollection from an Array of Polygon coordinates.
- Source:
Example
var polygons = turf.polygons([
[[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
[[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
]);
//=polygons
polygonToLineString
Converts a Polygon or MultiPolygon to a FeatureCollection of LineString or MultiLineString.
- Source:
Example
var poly = {
'type': 'Feature',
'properties': {},
'geometry': {
'type': 'Polygon',
'coordinates': [[[125, -30], [145, -30], [145, -20], [125, -20], [125, -30]]]
}
}
var lines = turf.polygonToLineString(poly);
//addToMap
var addToMap = [lines]
polygonToLineString
Converts a Polygon or MultiPolygon to a FeatureCollection of LineString or MultiLineString.
- Source:
Example
var poly = {
'type': 'Feature',
'properties': {},
'geometry': {
'type': 'Polygon',
'coordinates': [[[125, -30], [145, -30], [145, -20], [125, -20], [125, -30]]]
}
}
var lines = turf.polygonToLineString(poly);
//addToMap
var addToMap = [lines]
propEach
Iterate over properties in any GeoJSON object, similar to Array.forEach()
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {"foo": "bar"},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {"hello": "world"},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.propEach(features, function (currentProperties, currentIndex) {
//=currentProperties
//=currentIndex
});
propEach
Iterate over properties in any GeoJSON object, similar to Array.forEach()
- Source:
Example
var features = turf.featureCollection([
turf.point([26, 37], {foo: 'bar'}),
turf.point([36, 53], {hello: 'world'})
]);
turf.propEach(features, function (currentProperties, featureIndex) {
//=currentProperties
//=featureIndex
});
propEach
Iterate over properties in any GeoJSON object, similar to Array.forEach()
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {"foo": "bar"},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {"hello": "world"},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.propEach(features, function (currentProperties, currentIndex) {
//=currentProperties
//=currentIndex
});
propEach
Iterate over properties in any GeoJSON object, similar to Array.forEach()
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {"foo": "bar"},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {"hello": "world"},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.propEach(features, function (currentProperties, currentIndex) {
//=currentProperties
//=currentIndex
});
propReduce
Reduce properties in any GeoJSON object into a single value,
similar to how Array.reduce works. However, in this case we lazily run
the reduction, so an array of all properties is unnecessary.
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {"foo": "bar"},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {"hello": "world"},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.propReduce(features, function (previousValue, currentProperties, currentIndex) {
//=previousValue
//=currentProperties
//=currentIndex
return currentProperties
});
propReduce
Reduce properties in any GeoJSON object into a single value,
similar to how Array.reduce works. However, in this case we lazily run
the reduction, so an array of all properties is unnecessary.
- Source:
Example
var features = turf.featureCollection([
turf.point([26, 37], {foo: 'bar'}),
turf.point([36, 53], {hello: 'world'})
]);
turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {
//=previousValue
//=currentProperties
//=featureIndex
return currentProperties
});
propReduce
Reduce properties in any GeoJSON object into a single value,
similar to how Array.reduce works. However, in this case we lazily run
the reduction, so an array of all properties is unnecessary.
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {"foo": "bar"},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {"hello": "world"},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.propReduce(features, function (previousValue, currentProperties, currentIndex) {
//=previousValue
//=currentProperties
//=currentIndex
return currentProperties
});
propReduce
Reduce properties in any GeoJSON object into a single value,
similar to how Array.reduce works. However, in this case we lazily run
the reduction, so an array of all properties is unnecessary.
- Source:
Example
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {"foo": "bar"},
"geometry": {
"type": "Point",
"coordinates": [26, 37]
}
},
{
"type": "Feature",
"properties": {"hello": "world"},
"geometry": {
"type": "Point",
"coordinates": [36, 53]
}
}
]
};
turf.propReduce(features, function (previousValue, currentProperties, currentIndex) {
//=previousValue
//=currentProperties
//=currentIndex
return currentProperties
});
radiansToDegrees
Converts an angle in radians to degrees
- Source:
radiansToDistance
Convert a distance measurement from radians to a more friendly unit.
- Source:
radiansToDistance
Convert a distance measurement from radians to a more friendly unit.
- Source:
radiansToLength
Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
- Source:
rbush
GeoJSON implementation of [RBush](https://github.com/mourner/rbush#rbush) spatial index.
- Source:
Example
var rbush = require('geojson-rbush')
var tree = rbush()
rbush
GeoJSON implementation of [RBush](https://github.com/mourner/rbush#rbush) spatial index.
- Source:
Example
var rbush = require('geojson-rbush')
var tree = rbush()
simplify
Takes a LineString or Polygon and returns a simplified version. Internally uses [simplify-js](http://mourner.github.io/simplify-js/) to perform simplification.
- Source:
Example
var feature = {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [[
[-70.603637, -33.399918],
[-70.614624, -33.395332],
[-70.639343, -33.392466],
[-70.659942, -33.394759],
[-70.683975, -33.404504],
[-70.697021, -33.419406],
[-70.701141, -33.434306],
[-70.700454, -33.446339],
[-70.694274, -33.458369],
[-70.682601, -33.465816],
[-70.668869, -33.472117],
[-70.646209, -33.473835],
[-70.624923, -33.472117],
[-70.609817, -33.468107],
[-70.595397, -33.458369],
[-70.587158, -33.442901],
[-70.587158, -33.426283],
[-70.590591, -33.414248],
[-70.594711, -33.406224],
[-70.603637, -33.399918]
]]
}
};
var tolerance = 0.01;
var simplified = turf.simplify(
feature, tolerance, false);
//=feature
//=simplified
within
Takes a set of points and a set of polygons and returns the points that fall within the polygons.
- Source:
Example
var searchWithin = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [[
[-46.653,-23.543],
[-46.634,-23.5346],
[-46.613,-23.543],
[-46.614,-23.559],
[-46.631,-23.567],
[-46.653,-23.560],
[-46.653,-23.543]
]]
}
}
]
};
var points = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-46.6318, -23.5523]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-46.6246, -23.5325]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-46.6062, -23.5513]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-46.663, -23.554]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-46.643, -23.557]
}
}
]
};
var ptsWithin = turf.within(points, searchWithin);
//=points
//=searchWithin
//=ptsWithin
Type Definitions
coordEachCallback(currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex)
Callback for coordEach
Parameters:
| Name | Type | Description |
|---|---|---|
currentCoord |
Array.<number> | The current coordinate being processed. |
coordIndex |
number | The current index of the coordinate being processed. |
featureIndex |
number | The current index of the Feature being processed. |
multiFeatureIndex |
number | The current index of the Multi-Feature being processed. |
geometryIndex |
number | The current index of the Geometry being processed. |
- Source:
coordReduceCallback(previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex)
Callback for coordReduce
The first time the callback function is called, the values provided as arguments depend
on whether the reduce method has an initialValue argument.
If an initialValue is provided to the reduce method:
- The previousValue argument is initialValue.
- The currentValue argument is the value of the first element present in the array.
If an initialValue is not provided:
- The previousValue argument is the value of the first element present in the array.
- The currentValue argument is the value of the second element present in the array.
Parameters:
| Name | Type | Description |
|---|---|---|
previousValue |
* | The accumulated value previously returned in the last invocation of the callback, or initialValue, if supplied. |
currentCoord |
Array.<number> | The current coordinate being processed. |
coordIndex |
number | The current index of the coordinate being processed. Starts at index 0, if an initialValue is provided, and at index 1 otherwise. |
featureIndex |
number | The current index of the Feature being processed. |
multiFeatureIndex |
number | The current index of the Multi-Feature being processed. |
geometryIndex |
number | The current index of the Geometry being processed. |
- Source:
featureEachCallback(currentFeature, featureIndex)
Callback for featureEach
Parameters:
| Name | Type | Description |
|---|---|---|
currentFeature |
Feature.<any> | The current Feature being processed. |
featureIndex |
number | The current index of the Feature being processed. |
- Source:
featureReduceCallback(previousValue, currentFeature, featureIndex)
Callback for featureReduce
The first time the callback function is called, the values provided as arguments depend
on whether the reduce method has an initialValue argument.
If an initialValue is provided to the reduce method:
- The previousValue argument is initialValue.
- The currentValue argument is the value of the first element present in the array.
If an initialValue is not provided:
- The previousValue argument is the value of the first element present in the array.
- The currentValue argument is the value of the second element present in the array.
Parameters:
| Name | Type | Description |
|---|---|---|
previousValue |
* | The accumulated value previously returned in the last invocation of the callback, or initialValue, if supplied. |
currentFeature |
Feature | The current Feature being processed. |
featureIndex |
number | The current index of the Feature being processed. |
- Source:
flattenEachCallback(currentFeature, featureIndex, multiFeatureIndex)
Callback for flattenEach
Parameters:
| Name | Type | Description |
|---|---|---|
currentFeature |
Feature | The current flattened feature being processed. |
featureIndex |
number | The current index of the Feature being processed. |
multiFeatureIndex |
number | The current index of the Multi-Feature being processed. |
- Source:
flattenReduceCallback(previousValue, currentFeature, featureIndex, multiFeatureIndex)
Callback for flattenReduce
The first time the callback function is called, the values provided as arguments depend
on whether the reduce method has an initialValue argument.
If an initialValue is provided to the reduce method:
- The previousValue argument is initialValue.
- The currentValue argument is the value of the first element present in the array.
If an initialValue is not provided:
- The previousValue argument is the value of the first element present in the array.
- The currentValue argument is the value of the second element present in the array.
Parameters:
| Name | Type | Description |
|---|---|---|
previousValue |
* | The accumulated value previously returned in the last invocation of the callback, or initialValue, if supplied. |
currentFeature |
Feature | The current Feature being processed. |
featureIndex |
number | The current index of the Feature being processed. |
multiFeatureIndex |
number | The current index of the Multi-Feature being processed. |
- Source:
geomEachCallback(currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
Callback for geomEach
Parameters:
| Name | Type | Description |
|---|---|---|
currentGeometry |
Geometry | The current Geometry being processed. |
featureIndex |
number | The current index of the Feature being processed. |
featureProperties |
Object | The current Feature Properties being processed. |
featureBBox |
Array.<number> | The current Feature BBox being processed. |
featureId |
number | string | The current Feature Id being processed. |
- Source:
geomReduceCallback(previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
Callback for geomReduce
The first time the callback function is called, the values provided as arguments depend
on whether the reduce method has an initialValue argument.
If an initialValue is provided to the reduce method:
- The previousValue argument is initialValue.
- The currentValue argument is the value of the first element present in the array.
If an initialValue is not provided:
- The previousValue argument is the value of the first element present in the array.
- The currentValue argument is the value of the second element present in the array.
Parameters:
| Name | Type | Description |
|---|---|---|
previousValue |
* | The accumulated value previously returned in the last invocation of the callback, or initialValue, if supplied. |
currentGeometry |
Geometry | The current Geometry being processed. |
featureIndex |
number | The current index of the Feature being processed. |
featureProperties |
Object | The current Feature Properties being processed. |
featureBBox |
Array.<number> | The current Feature BBox being processed. |
featureId |
number | string | The current Feature Id being processed. |
- Source:
lineEachCallback(currentLine, featureIndex, multiFeatureIndex, geometryIndex)
Callback for lineEach
Parameters:
| Name | Type | Description |
|---|---|---|
currentLine |
Feature.<LineString> | The current LineString|LinearRing being processed |
featureIndex |
number | The current index of the Feature being processed |
multiFeatureIndex |
number | The current index of the Multi-Feature being processed |
geometryIndex |
number | The current index of the Geometry being processed |
- Source:
lineReduceCallback(previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)
Callback for lineReduce
The first time the callback function is called, the values provided as arguments depend
on whether the reduce method has an initialValue argument.
If an initialValue is provided to the reduce method:
- The previousValue argument is initialValue.
- The currentValue argument is the value of the first element present in the array.
If an initialValue is not provided:
- The previousValue argument is the value of the first element present in the array.
- The currentValue argument is the value of the second element present in the array.
Parameters:
| Name | Type | Description |
|---|---|---|
previousValue |
* | The accumulated value previously returned in the last invocation of the callback, or initialValue, if supplied. |
currentLine |
Feature.<LineString> | The current LineString|LinearRing being processed. |
featureIndex |
number | The current index of the Feature being processed |
multiFeatureIndex |
number | The current index of the Multi-Feature being processed |
geometryIndex |
number | The current index of the Geometry being processed |
- Source:
propEachCallback(currentProperties, featureIndex)
Callback for propEach
Parameters:
| Name | Type | Description |
|---|---|---|
currentProperties |
Object | The current Properties being processed. |
featureIndex |
number | The current index of the Feature being processed. |
- Source:
propReduceCallback(previousValue, currentProperties, featureIndex)
Callback for propReduce
The first time the callback function is called, the values provided as arguments depend
on whether the reduce method has an initialValue argument.
If an initialValue is provided to the reduce method:
- The previousValue argument is initialValue.
- The currentValue argument is the value of the first element present in the array.
If an initialValue is not provided:
- The previousValue argument is the value of the first element present in the array.
- The currentValue argument is the value of the second element present in the array.
Parameters:
| Name | Type | Description |
|---|---|---|
previousValue |
* | The accumulated value previously returned in the last invocation of the callback, or initialValue, if supplied. |
currentProperties |
* | The current Properties being processed. |
featureIndex |
number | The current index of the Feature being processed. |
- Source:
segmentEachCallback(currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) → {void}
Callback for segmentEach
Parameters:
| Name | Type | Description |
|---|---|---|
currentSegment |
Feature.<LineString> | The current Segment being processed. |
featureIndex |
number | The current index of the Feature being processed. |
multiFeatureIndex |
number | The current index of the Multi-Feature being processed. |
geometryIndex |
number | The current index of the Geometry being processed. |
segmentIndex |
number | The current index of the Segment being processed. |
- Source:
Returns:
- Type
- void
segmentReduceCallback(previousValue, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)
Callback for segmentReduce
The first time the callback function is called, the values provided as arguments depend
on whether the reduce method has an initialValue argument.
If an initialValue is provided to the reduce method:
- The previousValue argument is initialValue.
- The currentValue argument is the value of the first element present in the array.
If an initialValue is not provided:
- The previousValue argument is the value of the first element present in the array.
- The currentValue argument is the value of the second element present in the array.
Parameters:
| Name | Type | Description |
|---|---|---|
previousValue |
* | The accumulated value previously returned in the last invocation of the callback, or initialValue, if supplied. |
currentSegment |
Feature.<LineString> | The current Segment being processed. |
featureIndex |
number | The current index of the Feature being processed. |
multiFeatureIndex |
number | The current index of the Multi-Feature being processed. |
geometryIndex |
number | The current index of the Geometry being processed. |
segmentIndex |
number | The current index of the Segment being processed. |
- Source:


This Hotpot Buffet Restaurant Gives Drunk Customers a 10% Discount After 10.30pm!
by Sheralyn TanTap to listen to this article instead: 🔊 Listen to Post
If you go into this restaurant sober, you’d have to pay the full price for their hotpot buffet. But if you’re drunk, you can get a 10% discount! What?
The name of this restaurant is Yu Long Men Hotpot and it is located in Chinatown, Singapore. They offer hotpot buffets right until 4.30am, and if you go in a little tipsy, you will get a 10% discount starting from 10.30pm until the shop closes.
A video posted on Facebook page, Buffet King, shows how the cashier uses an alcohol detector that guests are required to blow into to test their blood alcohol concentration.
Once you’re in, each diner gets to have their own hotpot which you can fill with a selection of nine soup bases!
There’s also a free-flow menu for the following dishes:
– Xiao long bao
– Dumplings
– Over 60 items at the buffet counter
– Fresh sliced meat
– Ice cream dessert
– Hot desserts
– Selected drinks
– Complimentary Condiments
But do take note that their supper timing from 10.30pm – 4.30am is only available from Wednesdays to Sundays.
Here are the meal prices:
Sun, Wed, Thurs – $19.99++ (RM60++)
Fri, Sat and Public Holidays – $26.99++ (RM82++)
Prices exclude GST & Service Charge
So, if you were to go for supper on a Saturday, your meal would cost about RM82, and if you’re drunk, you can have a 10% discount from that price!
Aside from supper, the restaurant also offers lunch from 11.30am to 4.30pm and dinner from 4.30pm to 10.30pm. Meals are limited to 1 hour and 40 minutes.
Here are more details of the restaurant:
Name: Yue Long Men Hotpot 悦龍門火锅
Address: 75 Pagoda Street Chinatown MRT Exit A
Opening hours: 11.30am to 4.30am midnight
Do you think getting a 10% discount for being drunk is a good deal? Well, you can find out for yourself by heading there after getting a few drinks and let us know in the comments below!
Also read: The World’s Largest Hotpot Can Hold 2,000kg of Soup & Fit 56 People At The Same Time!


|
Cuba
EmbargoUnder American embargo since 1960 because Cuba is a puppet state of the Soviet Union. Oh wait, that's over now. Under embargo since 1989 because, umm, uhh, I forget. We want to support Democracy or something. After all, we have a long history of supporting Democracy, such as in Chile (architecting the overthrow by Augusto Pinochet of the democratically elected but mildly socialist government of Salvador Allende); in Colombia (American support of death squads who killed over three thousand); in El Salvador (American support of death squads who killed many thousands), in Iraq (American support of the regime of democrat Saddam Hussein, including providing him with biological weapons.)By all means, this embargo must continue. It's important! |


New Simulations
- Now have code to run partitioned models on the Anoles dataset, compare partitioned models to the paintings chosen by Butler and King. Preliminary figures below. Models with _s are partitioned by my algorithm, others are the the original ones from earlier.
- Also have examples with simulated data with a known number of partitions, to check the method. Tested with data produced at two peaks on the Labrid tree, the pattern seems similar to that of the Labrids – comparisons involving any model with more than 2 peaks produce LR ratios that become very unlikely in either pairwise comparison. Still needs further exploration. Preliminary figures:
### Interpreting Results
Pattern: In the bootstrapping, the model generating the data always scores substantially higher than the test model, making all distributions fall in the positive range. Note that parameters are fixed, hence the more complicated model does not have an advantage in this bootstrapping. Meanwhile, the more complicated model does substantially better at the real data than the simpler model, since in this case both have there parameters fit to the data. Consequently the red line falls deep in the negative for the bootstraps simulated under the simple model and makes it appear as though the more complicated model is always correct. Perhaps comparing models in which the parameters are allowed to vary may indeed be more meaningful.
Compare to parameter varying case.
Now simulating with parameter varying using simulated two-peak dataset.
Beating bugs and improving code
Found a work-around in the bug that was preventing me from running the Anoles dataset under partitioning. The problem seems to be the reorder.phylo() by pruning order command, which is called by the ace() function on the phylogenetic tree. This function calls a C function to do the reordering, which somehow gets stuck on an infinite loop when given a file converted from ouch format to ape format using my function. Writing my converted tree out to a nexus file with write.nexus() and then reading it back in seems to solve this problem.
Made my convert() function build its “phylo” tree arguments in the same order (edge, Nnode, tip.label, edge.length) as they are assigned in the “phylo” objects created by read.nexus, though this doesn’t seem to matter as most calls are made with phy$edge rather than phy[1].
Code now avoids bootstrapping a model against itself.
Could avoid re-simulating datasets for each figure in the same row, but should profile the code first to make sure this is worth while.
should start logging simulation runs directly and fixing seed.
png and cairo devices haven’t been installed on the server, figures output in pdf and converted to png by imagemagick with bash:
for i in *.pdf; do convert "$i" "${i/.pdf}".png; done
- see git log for more details.
Notes
Google Summer of Code includes NesCent “phyloinformatics” research
still reading: open science, part 2, and also enjoyed this
CSGF Conference HPC Survey
- Not directly phylogentics, but also working on today:
- I was contacted by Mary Ann 3 days ago on doing another survey of CSGF fellows. Last year’s survey was pretty basic (results). Also interested to explore alternatives to surveymonkey, though it did make things quite easy and Krell can probably get the subscription. Possibly Google forms?
Some goals I have for the survey:
- Who knows/uses what. Be able to see what languages, parallelization, and scale of computation fellows are computing on. The crucial goal for this year is to be able to break this down by subject area and by year in the fellowship.
- Effective practices in computing. Hugely important but too rarely taught (in sciences anyway). Version control, debugging, visualization, etc. A great example of this stuff is to see the quiz on Software Carpentry(scroll down to #5)
- Science 2.0 This goes a little further afield and might deserve its own session. Computers and the internet continue to change many aspects in the way we do science and it makes sense that CSGFs should be at the forefront. Large-scale online collaborations. The benefits and risks of science blogging. Standardized and publicly accessible data, source code, publications, and notebooks. Social networking for scientists. There’s a wealth of rapidly emerging tools in this area that I think we should all know about. Two quick examples: Mendeley for organizing our collections of scientific papers and stackoverflow.com for solving programming problems collaboratively.


| bruto | Fit an Additive Spline Model by Adaptive Backfitting |
| coef.fda | Produce coefficients for an fda or mda object |
| coef.mda | Produce coefficients for an fda or mda object |
| confusion | Confusion Matrices |
| confusion.default | Confusion Matrices |
| confusion.fda | Confusion Matrices |
| confusion.list | Confusion Matrices |
| ESL.mixture | Mixture example from "Elements of Statistical Learning" |
| fda | Flexible Discriminant Analysis |
| gen.ridge | Penalized Regression |
| glass | Glass Identification Database |
| laplacian | create penalty object for two-dimensional smoothing. |
| mars | Multivariate Adaptive Regression Splines |
| mda | Mixture Discriminant Analysis |
| mda.start | Initialization for Mixture Discriminant Analysis |
| model.matrix.mars | Produce a Design Matrix from a 'mars' Object |
| mspline | Vector Smoothing Spline |
| plot.fda | Plot for Flexible Discriminant Analysis |
| polyreg | Polynomial Regression |
| predict.bruto | Predict method for BRUTO Objects |
| predict.fda | Classify by Flexible Discriminant Analysis |
| predict.gen.ridge | Penalized Regression |
| predict.mars | Predict method for MARS Objects |
| predict.mda | Classify by Mixture Discriminant Analysis |
| predict.polyreg | Polynomial Regression |
| print.fda | Flexible Discriminant Analysis |
| print.mda | Mixture Discriminant Analysis |
| softmax | Find the Maximum in Each Row of a Matrix |


The Downfall of Taylor Swift
A Cautionary Tale
cnpence dariseejr mikerw
20 July 2016
Biggest Phenomena
The Downfall
of
Taylor Swift
Extensive (Scientific) Research
2009 VMAs
CONTROVERSIAL
Attacking
Never made aware
Acceptance speech
Distraction?
No direct response
JULY 2016
Videos Released to SnapChat
"Go with whatever line you think is better"
"I'm gonna be like-- he called me"
Asassination of Character
Written in advance?
Privacy Laws
Misdemeanor Charge
Three years in state prison?
Rare case
MOST IMPORTANT STORY OF THE YEAR


| 接口 | 说明 |
|---|---|
| ScrollableHitSource.Hit |
A document returned as part of the response.
|
| SuccessfullyProcessed |
Implemented by
WorkerBulkByScrollTaskState and BulkByScrollTask.Status to consistently implement
SuccessfullyProcessed.getSuccessfullyProcessed() . |
| 类 | 说明 |
|---|---|
| AbstractBulkByScrollRequest<Self extends AbstractBulkByScrollRequest<Self>> | |
| AbstractBulkByScrollRequestBuilder<Request extends AbstractBulkByScrollRequest<Request>,Self extends AbstractBulkByScrollRequestBuilder<Request,Self>> | |
| AbstractBulkIndexByScrollRequest<Self extends AbstractBulkIndexByScrollRequest<Self>> | |
| AbstractBulkIndexByScrollRequestBuilder<Request extends AbstractBulkIndexByScrollRequest<Request>,Self extends AbstractBulkIndexByScrollRequestBuilder<Request,Self>> | |
| BulkByScrollResponse |
Response used for actions that index many documents using a scroll request.
|
| BulkByScrollTask |
Task storing information about a currently running BulkByScroll request.
|
| BulkByScrollTask.Status | |
| BulkByScrollTask.StatusOrException |
The status of a slice of the request.
|
| ClientScrollableHitSource |
A scrollable source of hits from a Client instance.
|
| DeleteByQueryAction | |
| DeleteByQueryRequest |
Creates a new
DeleteByQueryRequest that uses scrolling and bulk requests to delete all documents matching
the query. |
| DeleteByQueryRequestBuilder | |
| LeaderBulkByScrollTaskState |
Tracks the state of sliced subtasks and provides unified status information for a sliced BulkByScrollRequest.
|
| ReindexAction | |
| ReindexRequest |
Request to reindex some documents from one index to another.
|
| ReindexRequestBuilder | |
| RemoteInfo | |
| ScrollableHitSource |
A scrollable source of results.
|
| ScrollableHitSource.BasicHit |
An implementation of ScrollableHitSource.Hit that uses getters and setters.
|
| ScrollableHitSource.Response |
Response from each scroll batch.
|
| ScrollableHitSource.SearchFailure |
A failure during search.
|
| UpdateByQueryAction | |
| UpdateByQueryRequest |
Request to update some documents.
|
| UpdateByQueryRequestBuilder | |
| WorkerBulkByScrollTaskState |
Task behavior for
BulkByScrollTask that does the actual work of querying and indexing |


{% extends "partials/tooltips/base.html" %} {% block title %} Child Support Affidavit (F37) {% endblock %} {% block inner %}
This form gives facts about your children and child support, including the order you're asking the court for. You must also attach your separation agreement or court orders about children to this form as exhibits if you have children.
Since your divorce won't require an appearance before a judge, you must fill out and swear / affirm a Child Support Affidavit Form (F37). This document gives information about the children and child support.
You'll notice that some of the information in the affidavit is the same as what's in your Notice of Joint Family Claim Form (F1). Because the Notice of Joint Family Claim is not a sworn document, and the judge / master must have sworn evidence to make a decision, you must swear or affirm that the information in these affidavits is true.
The fee for swearing / affirming this document is $40 per affidavit if sworn at a court registry.


Fn::ImportValue
The intrinsic function Fn::ImportValue
returns the value of an output exported by another stack. You
typically use this function to create cross-stack
references. In the following example template snippets, Stack A exports VPC security
group values and Stack B imports them.
The following restrictions apply to cross-stack references:
-
For each AWS account,
Export
names must be unique within a region. -
You can't create cross-stack references across regions. You can use the intrinsic function
Fn::ImportValue
to import only values that have been exported within the same region. -
For outputs, the value of the
Name
property of anExport
can't useRef
orGetAtt
functions that depend on a resource.Similarly, the
ImportValue
function can't includeRef
orGetAtt
functions that depend on a resource. -
You can't delete a stack if another stack references one of its outputs.
-
You can't modify or remove an output value that is referenced by another stack.
JSON
Stack A Export
"Outputs" : { "PublicSubnet" : { "Description" : "The subnet ID to use for public web servers", "Value" : { "Ref" : "PublicSubnet" }, "Export" : { "Name" : {"Fn::Sub": "${AWS::StackName}-SubnetID" }} }, "WebServerSecurityGroup" : { "Description" : "The security group ID to use for public web servers", "Value" : { "Fn::GetAtt" : ["WebServerSecurityGroup", "GroupId"] }, "Export" : { "Name" : {"Fn::Sub": "${AWS::StackName}-SecurityGroupID" }} } }
YAML
Stack A Export
Outputs: PublicSubnet: Description: The subnet ID to use for public web servers Value: Ref: PublicSubnet Export: Name: 'Fn::Sub': '${AWS::StackName}-SubnetID' WebServerSecurityGroup: Description: The security group ID to use for public web servers Value: 'Fn::GetAtt': - WebServerSecurityGroup - GroupId Export: Name: 'Fn::Sub': '${AWS::StackName}-SecurityGroupID'
JSON
Stack B Import
"Resources" : { "WebServerInstance" : { "Type" : "AWS::EC2::Instance", "Properties" : { "InstanceType" : "t2.micro", "ImageId" : "ami-a1b23456", "NetworkInterfaces" : [{ "GroupSet" : [{"Fn::ImportValue" : {"Fn::Sub" : "${NetworkStackNameParameter}-SecurityGroupID"}}], "AssociatePublicIpAddress" : "true", "DeviceIndex" : "0", "DeleteOnTermination" : "true", "SubnetId" : {"Fn::ImportValue" : {"Fn::Sub" : "${NetworkStackNameParameter}-SubnetID"}} }] } } }
YAML
Stack B Import
Resources: WebServerInstance: Type: 'AWS::EC2::Instance' Properties: InstanceType: t2.micro ImageId: ami-a1b23456 NetworkInterfaces: - GroupSet: - Fn::ImportValue: 'Fn::Sub': '${NetworkStackNameParameter}-SecurityGroupID' AssociatePublicIpAddress: 'true' DeviceIndex: '0' DeleteOnTermination: 'true' SubnetId: Fn::ImportValue 'Fn::Sub': '${NetworkStackNameParameter}-SubnetID'
Declaration
JSON
{ "Fn::ImportValue" :
sharedValueToImport
}
YAML
You can use the full function name:
Fn::ImportValue:
sharedValueToImport
Alternatively, you can use the short form:
!ImportValue
sharedValueToImport
You can't use the short form of !ImportValue
when it contains a
!Sub
.
# do not use !ImportValue 'Fn::Sub': '${NetworkStack}-SubnetID'
Instead, you must use the full function name, for example:
{ "Fn::ImportValue": { "Fn::Sub": "${NetworkStack}-SubnetID" } }
Fn::ImportValue: !Sub "${NetworkStack}-SubnetID"
Parameters
- sharedValueToImport
-
The stack output value that you want to import.
Return value
The stack output value.
Example
JSON
{ "Fn::ImportValue" : {"Fn::Sub": "${NetworkStackNameParameter}-SubnetID" } }
YAML
Fn::ImportValue: !Sub "${NetworkStackName}-SecurityGroupID"
Supported functions
You can use the following functions in the Fn::ImportValue
function. The
value of these functions can't depend on a resource.
-
Fn::Base64
-
Fn::FindInMap
-
Fn::If
-
Fn::Join
-
Fn::Select
-
Fn::Split
-
Fn::Sub
-
Ref


{% if object_list %}
| ID | Action | Created By | Created At | |
|---|---|---|---|---|
|
{% include 'actions/action_detail_block.html' %}
|
{{ action.id }} | {{ action.title }} | {{ action.created_by }} | {{ action.created_at }} |
No Actions To Show


Larkhall thug who tried to rob a shop assistant claims it was a prank
Brandon Watson fled empty-handed, but immediately went into a church and stole an elderly woman’s purse.
by Hamilton Advertiser, https://www.dailyrecord.co.uk/authors/hamilton-advertiser/A Larkhall thug who tried to rob a shop assistant at knifepoint claimed the frightening incident was only a prank.
Brandon Watson fled empty-handed, but immediately went into a church and stole an elderly woman’s purse.
Watson, 22, of Balfour Wynd, was jailed for 15 months at Hamilton Sheriff Court on Friday.
He admitted presenting a knife and demanding money from Kim Thain at Ashbridge Antiques in Union Street, Larkhall, on February 6.
Watson also admitted stealing a purse containing cash and cards from St Machan’s Parish Church in nearby Church Street.
Scott King, prosecuting, said the shop assistant was behind the counter when Watson arrived and demanded £40.
He told the court: “She refused to hand over any money and told the accused to leave.
“However, he stood where he was and lowered his right arm, exposing the tip of a knife concealed in his sleeve.
“He directed the witness’s attention to this and again asked for money.
“She refused again and Watson then said he was only joking, that he was filming proceedings to see what her reaction would be as part of a prank.
“He then ran from the shop.”
Watson went into St Machan’s Church, claiming he needed to see a minister because his dad had died.
A prayer meeting was taking place and he was asked to wait.
Mr King said: “There was a table beside him at the back of the church.
“A woman aged 73 had left her handbag on the table and the accused took the purse from it.
“People heard him leaving quickly and bags were checked. The woman realised her purse had been taken.
“Police were in the area after being called about the attempted robbery at the shop.
“They saw the accused, who matched the description of the suspect. He was searched and the purse was recovered.
“The woman’s bank cards were still there, but £20 was missing.”
Defence agent Diarmid Bruce said Watson has had difficulties with crack cocaine, heroin and valium. He had been taking drugs that day.
Mr Bruce stated: “He doesn’t know where he was going. He can’t remember having a knife. The lady in the shop was quite brave and the explanation he gave was bizarre.
“He has a record but this is, unfortunately, a step up for him.”
Watson is currently serving a 13-month prison sentence for other offences and his earliest release date is February 19.
Sheriff Thomas Millar said the 15-month stretch will start then.
The sheriff noted that Watson had previous convictions for crimes of dishonesty and described the purse theft as “pretty mean”.


{{username}}
{{profilepicture}}
Browse
Upload
My Courses
{{res}}
Review
Your review is important
SUBMIT
Loading ...
{{successMessage}}
{{errorMessage}}


About Recycling
Recycling is easy to do and really can make a difference.
Recycling saves resources
When we recycle, used materials are converted into new products, reducing the need to consume natural resources. If used materials are not recycled, new products are made by extracting fresh, raw materials from the earth, through mining and forestry. Recycling helps conserve important raw materials and protects natural habitats for the future.
Recycling saves energy
Using recycled materials in the manufacturing process uses considerably less energy than that required for producing new products from raw materials - even when comparing all associated costs, like transport. Plus there are extra energy savings because more energy is required to extract, refine, transport and process raw materials ready for industry compared with providing industry-ready materials.
Recycling helps protect the environment
Recycling reduces the need for extracting (mining, quarrying and logging), refining and processing raw materials all of which create substantial air and water pollution. As recycling saves energy it also reduces greenhouse gas emissions, which helps to tackle climate change.
Recycling reduces landfill
When we recycle, recyclable materials are reprocessed into new products, and as a result the amount of rubbish sent to landfill sites reduces.
How to recycle?
Make sure you're putting the right materials in your recycling container - paper, cardboard, metal cans, plastic bottles and jugs.
What goes in my recycling bin?
Paper & Cardboard
- Junk mail & Magazines
- Letters
- Packaging Boxes
- Food Boxes
- Kitchen Towel Tubes
Rigid Plastic
- Water Bottles
- Shampoo Bottles
- Plastic Milk Cartons
- Rigid Salad Containers
- Plastic Cleaning Bottles
Tins & Cans
- Food Cans
- Drink Cans
- Coffee Tins
- Pet Food Cans
- Soup Cans
What else can I recycle?
A wide range of items can be accepted at recycling facilities. Check with your local centre, as there can be considerable variation in what they accept.
Organic
- Food Scraps
- Yard Trimming
- Glass Clipping
- PGarden Residue
Glass
- Wine Bottles
- Food Jars
- Soft Drinks
- Beer Bottles
Textiles
- Bed Linen
- Towels
- Coats & Jackets
- Clean Clothes


Portfolio page
About me: Computers and dance moves
It takes a really long time to create a table with different colored-cells in Confluence. With this tool, it's as simple as clicking the color you want.
Languages used
HTML
CSS
Javascript
The default Confluence theme only has 5 colors. This tool automatically takes these colors are replaces it with more vibrant ones.
Languages used
HTML
CSS
Javascript
Content Editor
March 2018 – Present
Support Engineer
August 2015 – May 2016
Support Lead
June 2013 – August 2015
Facebook Pages Operations
May 2011 – January 2013
Portland, Oregon
Associates of Science
March 2016 – April 2017
Peoria, Illinois
Studied International Studies, French
Attended 2006 – 2010


I am a full stack developer from Seattle. I am experienced in back and front end development and enjoy producing high-quality work. I enjoy learning about new technologies. When I am not coding I enjoy traveling, playing my sax and clarinet, watching movies, and playing softball.
My technical skills include HTML, CSS, JavaScript, ExpressJS, Node.js, AngularJS, Ruby on Rails, Postgres, and SQL


We are working hard to provide you the most effective way to work with xml data. In order to do that properly, it would be great if you can support us. You can support us in different ways:
- use txml and benefit from its speed and the clear structure it provides.
- give feedback, open a issue on github.
- You can even create a PR. But we do not want you to wast a lot of effort and not having the change merged. Your time is valuable. Feel free to contact us first with a new open issue.
- help on this website. On this website we want to provide a documentation that does deeper than it is possible on the projects readme file. We want to show how all the methods are used and show how options effect the outcome. With examples we want to show how some real data is used with the library.