Node.js library for geospatial operations

I am developing an application where I have geospatial polygons, such as:

var polygon = [{"lat": -19.939323, "lng": -43.928983}, {"lat": -19.939747, "lng": -43.933103}, {"lat": -19.947291, "lng": -43.93497}, {"lat": -19.948138, "lng": -43.931451}, {"lat": -19.943882, "lng": -43.930292}] 

I will get the coordinate to say whether the polygon is inside or not. I found a function in the Geometry Library Javascript Google Maps API API that does the same: containsLocation (point: LatLng, polygon: Polygon)

But it should be server side using node.js, is there a way to use this function on node.js or, better, is there a good library that does this?

+4
source share
1 answer

There are several node modules, such as geolib :

A library for providing basic geospatial operations, such as calculating distances, converting decimal coordinates to field coordinates and vice versa, etc.

which have an equivalent function for determining coordinates relative to a polygon.

References

+7
source

All Articles