Skip to content

Check if your GPS coordinates are inside a polygon created by a GeoJSON file.

Notifications You must be signed in to change notification settings

brunocantuaria/gps-position-checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gps-position-checker

Check if your GPS coordinates are inside a polygon created by a GeoJSON file.

Objective

This sample from a project was created for checking if user is inside a brazillian state, Minas Gerais. Using libraries, the code is fairly simple and can easily be re-usable.

It was built using a GeoJSON file with the state borders, a 3rd party script for reading the file and check if a specific coordinate is inside it's borders, and a simple inline script for reading the browser geolocation.

Resources Used

  • d3-geo - Used for reading the GeoJSON file and check if point is inside the polygon created by it.
  • Exploratory Brazil States - The GeoJSON file was originated from the main state files provided by Exploratory.

Usage

  • Just download, unzip and open the geolocation.html file in your browser.

About

Check if your GPS coordinates are inside a polygon created by a GeoJSON file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages