SimpleGeoLoc simple items with geolocation, near items function
Simple geolocation functions. Add items with geolocation information, then find items near a point/distance.
Via npm on Node:
npm install simplegeoloc
Reference in your program:
var sgl = require'simplegeoloc';
Create an item store:
var store = sglcreateStore;
Add items to store:
storeaddlatitude longitude item;
storeadd-34.47706 -58.50177 city: 'Acassuso' geoname_id: 3436508 ;storeadd-34.74471 -58.40410 city: 'Banfield' geoname_id: 3436152 ;
Items near to a point:
var items = storenear-34.47706 -58.50177;
item (with the original associated item data).
- 0.0.1 Published, naive near implementation, visiting all items, using haversine function for distances
- First sample
- Improve near implementation, partitioning items using an internal grid, then, visiting all the items in near cells instead of all the item list
- New input format for position (latitude, longitude as strings; degree, minutes, seconds format
12° 20.736′ N, 98° 45.924′ W, etc)
- Geotagging with lat/long formats
- Geographic coordinate system
- How to convert address (as text) to gps coordinates?
- The Google Geocoding API
- Free Geocoding Utilities at GPSVisualizer.com
- Calculate distance between 2 GPS coordinates
- Calculate distance, bearing and more between Latitude/Longitude points See accuracy note, for error due to use medium earth radius
- What is the distance between a degree of latitude and longitude?
- Earth Radius
If you submit a pull request, please be sure to add or update corresponding
test cases, and ensure that
npm test continues to pass.