Code Monkey home page Code Monkey logo

geolocationrestapi's Introduction

GeoLocationRESTAPI

A basic REST API for geo locations around given GPS cordinates. This was made for a small class project.

The project is a Java based API and uses GPS coordinates to provide a list of points of interest around any given GPS coordinates. All the points so far have been extracted from Wikipedia articles. The API also supports adding a given point to the database through create method. The info is returned in a json format.

The project needs mongodb and Java Installed to run. To install mongodb on ubuntu

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10

echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0

multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list

sudo apt-get update

sudo apt-get install -y mongodb-org

To Test the project.

  1. mongorestore is a mongodb command to get the original database from dump folder To get the original database mongorestore --collection points --db wikip dump/wikip/points.bson

  2. Run the server and API through Java -jar service.jar

  3. The API should be active at http://localhost:8080/

API documentation

1.Create

Method: GET

Path: /api/wiki/add?

Parameters:

Lat

Log

Title

Url (Optional)

Example http://localhost:8080/api/wiki/add?lat=42.630933&log=- 71.370210&Title=MyPlace&url=http://www.princetonproperties.com/property/9063/M A/Lowell/Princeton-Park-Apartments.aspx Response: ["success"] Search by coordinates and Max distance. Method: GET Path: /api/wiki/loc Parameters: { Lat: Latitude (Required) Log: Longitude (Required) Max: Max distance in Meters (Required) }

geolocationrestapi's People

Contributors

arvkmr avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.