Created
September 16, 2018 15:25
-
-
Save lpirola/a6decc492848221c2622a913fc5fb375 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// construção do polygon a partir de um ponto | |
var center = [-75.343, 39.984]; | |
var radius = 5; | |
var options = {steps: 10, units: 'kilometers', properties: {foo: 'bar'}}; | |
var circle = turf.circle(center, radius, options); | |
// checagem se um ponto está no polígono | |
var pt = turf.point([-77, 44]); | |
var poly = turf.polygon([[ | |
[-81, 41], | |
[-81, 47], | |
[-72, 47], | |
[-72, 41], | |
[-81, 41] | |
]]); | |
turf.booleanPointInPolygon(pt, poly); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment