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: [email protected]
For additional commands, e-mail: [email protected]