gps

How to add GPS metadata to TIFF in Java?

故事扮演 提交于 2019-12-05 20:34:28
I am attempting to add GPS data to a TIFF file I am creating in Java. I am using the JAI-ImageIO libraries, although if there is a better library for doing both GPS metadata and custom metadata, I am willing to look into it. I have attempted to add the GPS metadata to the nodes directly, but it seems to strip off the GPS IDF tag. I have attempted to add the GPS IFD to the TIFFIFD object (from the TIFFIMageMetadata object), but that doesn't seem to save the data properly. Basically, I am struggling to get it to save the GPS data properly, and trying to figure out how to get the data in there.

Notify users when they reach a location

蹲街弑〆低调 提交于 2019-12-05 19:46:56
In the application I'm working on, one of the features is to notify the user when they reach a location that they have set prior. The code below is in addProximityAlert in Activity: final Intent intent = new Intent(PROX_ALERT_INTENT); final PendingIntent pendingIntent = PendingIntent.getBroadcast( InfoActivity.this, 0, intent, PendingIntent.FLAG_ONE_SHOT); LocationManager locationManager = (LocationManager) this .getSystemService(Context.LOCATION_SERVICE); locationManager.addProximityAlert(18.7726271, 98.9738381, 5000, -1, pendingIntent); this.locationReminderReceiver = new

sharing data between threads

自古美人都是妖i 提交于 2019-12-05 18:05:39
I have a java app with two different threads that does the following thing: 1.The first thread(which is a ThreadPool)- Listens to one port for incoming connections from five different users. Let's call them : user1 user2 user3 user4 user5 each of them sending GPS data. 2.The second thread In the same time my java app listens to a second port where waits for another client(different from those who send GPS data) to connect to it. Now...I have a second app that connects to the java app that I've just described it. In this second app I have a list user1...user5 and depending on which item I will

Q. Android GPS location

▼魔方 西西 提交于 2019-12-05 18:05:19
I'm trying to access my GPS location of my device, so I can then use this to load Google maps on the user's coordinates. I have followed various guides, but I dont seem to be acquiring any correct values. The app does not crash, it simply displays a zero Here is the code for my maps activity: import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v7.app.ActionBarActivity; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import

Android LocationManager network provider returns null

泄露秘密 提交于 2019-12-05 18:02:49
I wanted to get my GPS coordinates using Android App. I started developing, and I can get GPS coordinates, but they are not accurate. I wanted to use NETWORK_PROVIDER, but the Location by this provider is always null. More interesting, isProvicerEnabled returns true. I used example from this thread (best answer) enter link description here private void _getLocation() { // Get the location manager try { boolean isGPSEnabled = false; boolean isNetworkEnabled = false; locationManager = (LocationManager) getApplicationContext().getSystemService(LOCATION_SERVICE); Location location = null; double

Phonegap Android and GPS satellite

人走茶凉 提交于 2019-12-05 17:51:30
问题 It seems phonegap does not use GPS satellite instead geolocation from cellular network. I am not satisfied with the accuracy, always between 150-1000 meters. GPS activity logo is not displayed as well. Is there any way to force an android app to use GPS satellites even if other methods are available? Is there any way to override the default function to activate the GPS sat usage? Thanks in advance 回答1: PhoneGap actually uses GPS satellite geolocation just as Android platform does. You should

Every 1 Minute Gps LatLong Getting From Server Showing In Map as Marker. But Marker Geting Duplicating

岁酱吖の 提交于 2019-12-05 17:04:13
1.In My app Gps LatLong is Getting from Server Every OneMinute. Saved in Shared Pref ,then getting the LatLong From shared pref Showing the Marker on the Map . 2.Every One Minute I want to Move the Marker based on the LatLong. 3.But While Changing the Marker Location. Getting Duplicates . Please Help me to Solve this Issue. Inside Oncreate method i Called below Snippet in Every 60 Secs for Calling a Method. try { Thread t = new Thread() { @Override public void run() { try { while (!isInterrupted()) { Thread.sleep(60*1000); getActivity().runOnUiThread(new Runnable() { @Override public void run(

GPS V.S. accelerometer to calculate distance

冷暖自知 提交于 2019-12-05 16:59:00
问题 I am trying to implement a fitness app that can keep track of the running speed and running distance in Android. It looks like I can either use GPS or Accelerometer to calculate these information. Since a runner may put his phone in hand, on the shoulder or in his pocket, my first intuition is to use GPS to get locations and calculate running speed and running distance. But recently someone telled me that I can also use Accelerometer also does that. My question is: In Android, which approach

How to programmatically enable and disable GPS in Ionic Framework or Cordova

喜欢而已 提交于 2019-12-05 16:15:41
My problem is simple. I need a way to turn on and off GPS using a button inside an Ionic app. I've check the docs and read this ng-cordova plugin http://ngcordova.com/docs/plugins/geolocation/ but they don't seem have this funcction. Am I just missing something or is this even possible in Ionic Framework? Thanks! As far as I'm aware there isn't the ability to directly disable GPS from your app. If you are trying to allow the user to disable GPS, I achieved this by adding a setting to localStorage that the user can change on the settings page in my app. Every time I check for GPS in my location

how to use/install gps python library

梦想的初衷 提交于 2019-12-05 16:06:23
root@raspberrypi:~# python Python 2.7.3 (default, Jan 13 2013, 11:20:46) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from gps import gps Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: cannot import name gps >>> exit () it doesn't seem to work. Installed debian packages: gpsd, gpsd-clients, python-gps, libgps20, libgps-dev I tried it on an Ubuntu machine and it worked just fine: $ python Python 2.7.3 (default, Sep 26 2012, 21:51:14) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for