GithubHelp home page GithubHelp logo

geodata's Introduction

Instructions

  1. Add your google-services.json inside the app folder or connect the app using the Android Studio assistant
  2. You can download a simple json for uploading to your database
  3. This project assume your database rules are ment to be write and read true regardless login or not, please mind this security, this is only for demostration purpouse

Why not Geofire?

Geofire is a great project, which simplify the georeferencing work, but I don't feel using a library for my data structure is ok. For creating this I have base heavily in Geofire data structure

How does it work?

It will look for locations arround the current location based on the longitude or latitude. To reduce the data delivered to the user, there is an extra node which is the country code. This country code is obtained by the sim country code. This work as long as your app contemplate to be used by phones, for using it the user will need 3G or 4G therefore it will have a SIM card. Another approach could be getting the location, get the country, and then set it as the funnel node. Once the funnel and query data is obtained there is a simple presenter filtering the data again by the other coordinate (latitude or longitude, the opposite of your query choice).

Other queries can be performed by using the indexed data aproach.

Will this deliver too much data?

I don't think so. That is why there is funnel node with the country code. Since you can't make double queries in Firebase, the longitude-latitude requirement is hard to met. A composed attribute long_lat could work but it will face the same problem is attempted to solved here. To get the near data, 1km is more or less 0.01 degrees. So, current latitude, plus 0.01 and less 0.01 will give you 1km arround. The problem is that is not constrained by the other coordinate, so you get the entire world data. That could be a lot, and that cannot be solved by the compose attribute aproach, because the concatenation will also give you unexpected extra data. By this aproach, you limit whatever query only to a country reducing the ammount of data to something quickly transmitable for Firebase.

Suggestions and PRs are welcome

geodata's People

Contributors

cutiko avatar

Stargazers

 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.