Find distance to waypoints? Or waypoint within x miles? - android

This is more of a theoretical question on how to do it rather then an actual programming question. Target platform is Android, though.
I have a list of waypoints. And I have my current position. I want to know if any of the waypoints are close to me, eg. +/-5 km. I could calculate the distans to each waypoint seperately to find out if it is within the specified radius, but isn't there a better way to do this? Like, are these points included in this area (area beeing a 5km circle around my position) (you can do something like this when working with graphics and click/touch events)?
Any help is appreciated!
/Magnus

What you are looking for is Geo-spatial analysis? There is an open source java project for this.
http://java-source.net/open-source/geospatial
Google of course provides this service as part of pro maps package.
http://www.google.com/enterprise/earthmaps/index.html
(Note: I use semantic technology and allegrograph provides a decent geospatial api)

Related

Geofencing procedure

How does geofencing works? I mean I just need two GPS coordinates (user's and target's GPS coordinates) and radius, then find distance between of them and if distance is less than or equal to radius then person is in geofence . Or there is more?
That's pretty much it. There's probably some smoothing algorithms (to protect against bad readings causing a jump in a person's location),but its pretty much a distance check between two coordinates.
The above solution work fine if we have a circular geofence, But if we have a geofence in a polygon shape, then we have to check if the user's location is within the boundry of the polygon.
There are many ways to do so
1. Google apis (if we are looking for android development).
2. Here map ( if we are going to expose rest apis, it is paid service).
3. Openmap provide library which can be used to create rest back end points . (free)

Android - Augmented Reality using METAIO

I want to provide a service of augmented reality in my app using the location of the user. For example, if the user frames with the device's camera a monument, it must be provided a description on it.
How can i implement it on an Android app?
What framework I need to install?
Where I can find a few examples showing the basic functions?
EDIT
Rather than display the information on the monuments framed by the device, i could simply show in which direction are located certain points of interest. But, given a certain direction (eg north), how can i determine what is in that direction within a certain radius?
I think this is a whole field of study...
for example in Android, for implementing location you have to use the LocationManager.
To do the thing of the monument, you have to use iBeacon for Android for example.
Briefly, what you're looking for is "IPS - Indoor Position System". I dare to say this is not a place to ask for a "whole app projectation"
Good luck.
I have found the solution to the question above by myself. I'm using Metaio for android! It is a powerfull tool which provides a lot of examples about Augmented Reality!

Geolocation based augmented reality

My task is to develop application for Android that should be used by tourist. Basic use case: I am going through old part of some town and then i start my app, point with camera to some place and some old building that is already gone will be present in its place as it was before.
My first direction that i was exploring was location based recognizing, I tried some frameworks like Wikitude, MetaIO and DroidAR. None of these was 100% fulfilling my need, because (in my opinion), noone was using (for its robustness) the newest tools that should make easier this task, like new Google Play Services Location API. I dont know if I could do better but I would prefer not to write my own solution.
I am now thinking about exploring marker based recognition but it would require additional work to place some markers to desired places and I dont believe that user would be in right angle and distance to that marker. I have seen some video that used some sort of edge detection but none of frameworks I used had this feature.
Do you know about some direction, technology or idea that I could explore and may lead to successful solution?
Augmented Reality will transfer real coordinates system to camera coordinates system. In AR Location-based, the real coordinate is Geographic coordinate system. We will convert the GPS coordinate (Latitude, Longitude, Altitude) to Navigation coordinate (East, North, Up), then transfer Navigation coordinate to Camera coordinate and display it on camera view.
I just create demo for you, not using any SDK
https://github.com/dat-ng/ar-location-based-android
I personally recommend you to use "Wikitude". Because I have created AR app for android using Wikitude SDk.
Also here I'm providing you app link which has been developed by Wikitude itself.
See below link :
https://play.google.com/store/apps/details?id=com.wikitude&hl=en
This app will give you brief idea about exploring place details using Wikitude Sdk. These sdk have free as well as paid library. It is well documented & very easy to implement. Also they have given very good sample practices for beginners.
Refer this link :
http://www.wikitude.com/products/wikitude-augmented-reality-sdk-mobile/wikitude-sdk-android/
I hope this will take you on track.
you already had some great ideas about your app. I guess these links will make you to learn more.
See links below:
http://net.educause.edu/ir/library/pdf/ERB1101.pdf
http://www.adristorical-lands.eu/index.php/sq/augmented-reality-app
Hope this will help you to go further in your project. Thank you.

Android indoor map using image generates different path from point a to b depending on destination's input (No use of indoor navigation technologies)

I'm working on an android app for my final year project and I'm unsure how to solve this problem. I would like some advices to get me started in the right direction.
The project is to develop an android app to output a direction path from point a to point b on an image representing a two dimensional indoor map. The direction displayed will be depending on the user's input (destination). The starting point will always be the same location on the image. Once the user select a specific object, the app should find its location on the map using a database and then draw the direction's path from Point "a" to point "b".
I do not want to use any indoor navigation technology for this app. The location of each object on the map should be predefined and stored in a database.
The part which I am really unsure about is how to do the following for and android app. --> How to predefine points on an image and how to use these predefined data to display the path to take in the image representing the indoor map. I have been advised to use SVG (Scalable Vector Graphics), I have found androidVG to use SVG with android but I haven't found much information on it.
I am currently clueless regarding what language and techniques to use in order to perform the above feature on android.
Questions:
1) What general advice would you give me on how to effectively tackle this problem from the information I've provided?
2) Was I correctly advised when I have been given SVG as one of the language to use for the development of this app? If I was, would anybody have any more information on using SVG for android to provide me with?
3) IF there would be a better way to solve this problem which language should be used?
I really appreciate all the help provided in this community. Hopefully I have been clear enough, hoping to have my questions answered. Thank you!
For this use case I think it would be much simpler to just use the standard Canvas API to draw your lines rather than using an SVG renderer.
I would extend the Android ImageView class. In the onDraw() method call super.onDraw() to let it plot the image. Then add your lines using (for example) a set of canvas.drawLine() calls.

Alternative(To Google Maps) Open Source Map API that provides a database of nodes and Arcs on roads

I need a Map API for Android that can provide me with indexed nodes and indices that make up the road network. The main idea is to determine if two GPS devices are on the same road. Thank you in advance
A Map API by itself will not have that information. Anyway, you can get it from OpenStreetMap freely. You can download it from here.
I don't understand from your question if you intend on displaying the results on a map. If so, and you want a nice and free map API, I would suggest Leaflet. It's not as mature as the likes of OpenLayers but, as you've tagged this post with "android", Leaflet just kicks ass in the mobile department.
OpenStreetMap is definitely a good source of data for this kind of project. Unlike google maps, it gives developers access to the underlying vector data of a map (fully open). This allows interesting new use cases which simply are not possible with google maps, and something involving geometric calculations like this would definitely fit into that category. You either need OpenStreetMap or some other source of "vector" map data, and beyond OpenStreetMap this can be expensive.
Unfortunately that's not the full answer to your question. You still have a lot of work to do to use the data in the way you intend. You need to calculate the proximity of two points (GPS readings from two devices?) to nearby roads, and figure out which road the point lies closest to. It's the kind of powerful geo calculation you might do using a GIS package such as QGIS or a functions of a geo-aware database system PostGIS.
But that's not the answer to your question, because you need to do these calculations on device. I'm not aware of an off-the-shelf library to do this on android. I think you would have to roll your own.
But another challenge is to get the vector data onto the device in a suitable format in the first place, and this is the first thing to solve. You'd want the vector data either as a large download for a whole country, or perhaps a smaller area, perhaps with an on-the-fly download feature within this app. Whole countries are not infeasible when working with maps in vector form (ever tried the awesome MayDroyd app?), but require some compact formatting. Happily some of these problems are starting to be solved in open source off-the-shelf libraries. You could try to build on top of MapsForge for example.
So then you're back to the challenge of writing on-device code to poke around in this data and do the calculations you want to do. I suppose it could be rather good if projects like MapsForge included generic PostGIS style geo-functions to make this easier. Something to ask the mapsforge developers about perhaps.

Categories

Resources