Extracting GPS LATITUDE and GPS LONGITUDE from JPG images . . .
All --
I have a customer who is collecting field data for a research project using the cameras within several iPhones.
Some of the images that are being returned include GPS LATITUDE and GPS LONGITUDE information which is visible via the WINDOWS FILE DETAILS.
I have simulated this in the SCREEN CAPTURE attached of an image that I captured (and attached as "Aggie Muster -- 2014-04-22 - Copy.JPG") from my iPhone.
I have looked at the IMAGE INFORMATION that is shown by PREMIER as DOCUMENT PROPERTIES and some information shows up but much seems to be missing (please see "2014-04-23-101011.jpg").
Is there a way for PREMIER to gain access to the GPS INFORMATION stored within images of this type so that measurements made within PREMIER can be tagged with the locations where the images were taken?
Thanks.
-- Matt
I have a customer who is collecting field data for a research project using the cameras within several iPhones.
Some of the images that are being returned include GPS LATITUDE and GPS LONGITUDE information which is visible via the WINDOWS FILE DETAILS.
I have simulated this in the SCREEN CAPTURE attached of an image that I captured (and attached as "Aggie Muster -- 2014-04-22 - Copy.JPG") from my iPhone.
I have looked at the IMAGE INFORMATION that is shown by PREMIER as DOCUMENT PROPERTIES and some information shows up but much seems to be missing (please see "2014-04-23-101011.jpg").
Is there a way for PREMIER to gain access to the GPS INFORMATION stored within images of this type so that measurements made within PREMIER can be tagged with the locations where the images were taken?
Thanks.
-- Matt
0
Best Answer
-
Add these lines (GPSTesterModule.vb):
Imports System Imports System.Drawing
and replace "Console.WriteLine" with "Debug.Print"
0
Answers
Hi Matt,
Take a look (last post works):
http://www.vbforums.com/showthread.php?759587-Read-extra-file-properties
Let me know, if you need assistance to run this in Premier macro environment.
Thank you very much for your guidance.
I have:
** Created GPSTesterModule.vb (attached as GPSTesterModule.txt)
** Create GPSTesterProject.ipp (attached as GPSTesterProject.txt)
** Copied my example image to "C:\temp\Aggie Muster -- 2014-04-22 - Copy.JPG"
** Changed
Dim img As Image = Image.FromFile("C:\Temp\Montana.jpg")
to
Dim img As Image = _
Image.FromFile( _
"C:\temp\Aggie Muster -- 2014-04-22 - Copy.JPG" _
)
but the project does not LOAD. There is an issue within the DIM command shown above with the IMAGE type. I've looked at the information at
http://msdn.microsoft.com/en-us/library/system.drawing.imaging.propertyitem.id(v=vs.110).aspx
and see a reference to
Namespace: System.Drawing.Imaging
Assembly: System.Drawing (in System.Drawing.dll)
but I do not see a library / reference within the PROJECT WORKBENCH REFERENCES that matches this.
Will you please provide some guidance?
Thanks.
-- Matt
I've made the changes you recommended and everything is working properly.
After running the
MyTester
routine, the IMMEDIATE WINDOW contains
Image width : 456
Image height : 509
Latitude : N 29°40'45" = 29.67917
Longitude : W 95°23'38.8" = -95.39411
Altitude : 13.5 meters
EUREKA!!!
I have packaged the working VB FILE with the working IPP FILE into a PREMIER IPX FILE. That IPX FILE is attached here as
GPSTesterProject01.ipx
so that others can use this as a foundation for this type of functionality.
Thank you very very much for your assistance on this.
-- Matt
This PREMIER USER is an agricultural customer who wants to tag their measurements so they can be displayed by a GIS system. Having a method to do that within PREMIER "internally" rather than having to "weave" the data together "externally" will be very helpful to them.
I'm sure other PREMIER USERS will benefit from having this capability and I'm glad Nikita and I were able to create this reference for other developers.
Have a great day.
-- Matt