Skip to content

JulesStringer/geocode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

geocode utility

Uses a simple point in polygon function to geocode a point against a geojson object containing polygons and multipolygons The same coordinate reference system is assumed.

function is_point_in_polygon(point, vertices)

Returns if point is within a closed array of vertices

point point object = [x, y] vertices array of points which must be a linear ring (first vertex same as last)

returns true if point is inside polygon otherwise false

function geo_code_point(geojson, x, y, code_property)

Returns value of code_property from properties of feature for which point lies within its geometry.

geojson - geojson object x - x coordinate of point y - y coordinate of point code_property - name of property to return

return value: value of code_property from feature whose geometry contains point.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published