commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Franz <gr...@cip.ifi.lmu.de>
Subject Re: [SANSELAN] Problem reading GPS-Information from Images
Date Fri, 20 Nov 2009 12:31:04 GMT
Hi,
thanks for the link to jira.
For those who're interesed: there's already an open issue for this at
https://issues.apache.org/jira/browse/SANSELAN-21

Charles Matthew Chen wrote:
> Hi Franz,
> 
>    Please open an issue and attach an image that demonstrates the issue.
> 
> Thanks,
>    Charles
> 
> https://issues.apache.org/jira/browse/SANSELAN
> 
> 
> On Thu, Nov 19, 2009 at 3:38 PM, Franz <graff@cip.ifi.lmu.de> wrote:
>> Hello,
>>
>> I'm playing around with sanselan and wanted to extract the geotags of an
>> image and compare the data with the data displayed by IrvanView
>> (The image was geotagged using 'locr' before).
>>
>> IrfanView correctly extracts the GeoTags:
>> GPS Version ID: 2.2.0.0
>> GPS Latitude Ref: N
>> GPS Latitude: 47 49 2.29
>> GPS Longitude Ref: E
>> GPS Longitude: 11, 36, 40.114
>>
>> while Sanselan produces the following output
>> GPS Version ID: Not Found.
>> GPS Latitude Ref: 'R98'     <- should be N?
>> GPS Latitude: 48, 49, 48, 48<- should be 47 49 2.29?
>> GPS Longitude Ref: 'E'
>> GPS Longitude: 11, 36, 40114/1000 (40,114)
>>
>> My question now: are the Latitude values not correct or do I make a
>> mistake?
>>
>> The code to extract the GPS-Data is:
>>
>>> static void getLocation(File file) throws IOException, ImageReadException {
>>>     IImageMetadata metadata = Sanselan.getMetadata(file);
>>>     if (metadata instanceof JpegImageMetadata) {
>>>         JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;
>>>         for (TagInfo ti : GPSTagConstants.ALL_GPS_TAGS) {
>>>             TiffField field = jpegMetadata.findEXIFValue(ti);
>>>             if (field != null) {
>>>                 System.out.println(ti.name + ": " + field.getValueDescription());
>>>             }
>>>         }
>>>     }
>>> }
>> The image can be found at http://www.locked.de/geo1.jpg


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message