JavaScript Geospatial Analysis for the Browser, Desktop and Server
/*------------------------------
Turf Speaks GeoJSON
GeoJSON is the Language of Web GIS
One Tool for Many Platforms
Free & Open Source Software
-------------------------------*/
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point", /* LineString, Polygon */
"coordinates": [102.0, 0.5]
},
"properties": {
"field": "value"
}
}
]
}
/*
Zoning = Zoning Polygon
Address = Address Point
*/
Zoning.features.map(function(feature) {
if(turf.booleanContains(feature, Address)) {
console.log('Zoning Code: ', feature.code)
}else{
console.log('No Zoning Code Found!');
}
})