Camera.PictureCallback to return captured image metadata? - android-studio

I'm building an app that captures an image and at the same time save the coordinates and captured datetime.
Initially, I am using LocationListener to get the latitude & longitude, but I find it slows and unsafe, since user can just turn off and on the location thus saving a 0.0 value of latitude and longitude.
So to make it easier, I thought of using the captured image's metadata instead.
I am using
private Camera.PictureCallback mPicture = new Camera.PictureCallback()
Is it possible to get the EXIF metadata of the captured image? If so, how?

Related

How to uniquely identify animations?

I'm trying to access Animation's but so far the only method I could think of was:
tool
...
set_meta("animation_path",["NodePath/to/AnimationPlayer","Animation Name"])
var ani_data=get_meta("animation_path")
var animation=get_node(ani_data[0]).get_animation(ani_data[1])
but the problem is that if I change the Animation Name I'll have to reset the value, so is there no way to store a unique id for Animation resource?
I tried storing get_instance_id() & using instance_from_id() but that doesn't work when I restart the game engine
If the Animation is saved
Given that Animation is a Resource, I believe you can use the resource_path (given the Animation is saved).
The resource_path represents where the Resource is saved, and thus it persists when you restart the game engine.
Also, it would be unique for each Resource (it is possible to have multiple Resources saved in the same file, but then the resource_path of each Resource points to a sub-resource of the file).
And yes, the resource_path does not change when you rename the Animation.
The other idea that comes to mind is that the Animation itself has metadata which you could use.
If you will not be using the animation name, you would have to iterate over the Animations of the AnimationPlayer to find the one you want.
I suppose that if you use the resource_path, you could load it and get the animation name form there. You could also be getting the same instance… That happens if you are getting it from cache.
If the Animation is not saved.
First of all, storing metadata on the Animation should still work. Except, of course, it still means to iterate over the Animations to find the correct one.
If the goal is to not do that, then you can hold a Dictionary with String for keys and Animations as values, and keep it somewhere you know there is only one instance. For example:
Store it in an EditorPlugin.
Store it in an Autoload.
Store it in a specific Resource which you preload.
Store it on a const. Godot will admit Dictionary and Array as consts. Making them consts means you cannot set them… But they are still mutable. Furthermore, consts are shared among instances.

Uploading lat and long to umap/osm using python

I have a python script that enables me to get from openstreetmap the latitude and longitude, but I'm looking now how to create a custom map in OSM (or uMap) that allows me to upload a bunch of lat,lon coordenates and add a point in the map for each lat,lon pair. I know I can upload manually a csv file, but there are many points to put in the map and I can't upload a batch of 100k points in a single csv file. How can I achieve this?
EDIT: Following the answer of #Michael2, I created a new map and try to do the post request. However, I'm a little bit confused with the map id and the layer id.
If I create a new map, lets call it "mymap", then the ID would be "mymap_64813" or just "64813"? The "64813" is a number that umap gives me. And I can't figure out where to find the layer id :(
For uMap, you can emulate the POST request that umap uses to store the GEOJSON data. Create a new map and note the id of the map, the id of the primary data layer (umap supports multiple layers per map) and your session cookie.
Then do a POST request to:
https://umap.openstreetmap.de/de/map/<id of the map>/datalayer/update/<id of the layer>/
Make sure to send along the cookies for the owner and the csrf-token
The content should be a multipart form request with the following fields:
name: String of the layer name
display_on_load: true
rank: 0
geojson: A file with content type application/json and the actual point data in GEOJSON-Format.
To inspect this call, edit a sample map and have a look at the traffic between the client and the server using the web developer tools of your browser.

How to know whether there is a vertex called 'A' with data in it?

Actually I want to test my query on console. For that I need static data. Can I know that there is a data present or not in a particular vertex. If not I am able to keep the static data but in my vertex, I have property called 'location' which is of 'point'.
So while giving static data to location I have to specify the latitude and longitude.
here the location property is having type point. IF i meant to keep static data, I have to pass only one variable. But how to get the point using latitude and longitude?
Thanks in advance.
g.V().hasLabel('A').has('location','.....').valueMap()
If you need to create a Point then:
g.addV('A').property('location',Geoshape.point(37.97, 23.72))
You can read more about GeoShape here.
If you need to check if a vertex has a "location" property then:
g.V().hasLabel('A').has('location')

How to pass gnuradio-like tags in REDHAWK

I'm trying to replicate gnuradio-like tags in REDHAWK, SRI looks a bit promising but I'm not sure that I can achieve my goal with that tool.
I'll give a basic example, let's say that I have a component that detects that a certain signal starts at a position. This component doesn't do anything else but this. I'd like to pass this information onto the second component so that It can start working from that position forward.
Is there any way to mark the specific position in the bulkio stream and pass it to the next component?
gnuradio has tags, that can pass any userdata between computational components, and it's precise to the bit.
Have you tried using keywords? They are part of the SRI data structures and are a list of key value pairs. The key is a user defined string and the value is any standard type (double, string, int, etc). Here is how front end devices use them to pass along filter bandwidth and frequency information: http://redhawksdr.github.io/Documentation/mainap6.html#x25-542000F.5.2

Coredata Programming

I am newer to core data programming. Can anyone help me on the following issue.
I have created a object model wit 4 attributes in 1 entity. image name ,image coordinates,text, features.
And set all value to database, and i got all objects from array . Actually i need to compare the current image with database image. If exist i need to load all values from database ie, image name . image coordinates, text , and features to relevant loaded image. How do I compare self.image with images in the database.
Actually i am storing all url of the image to database,. How do i compare with self.image url and image url in the database , and load all values in to current view,.
Please help me.
Thanks in advance

Resources