You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Franz <gr...@cip.ifi.lmu.de> on 2009/11/19 21:38:22 UTC
[SANSELAN] Problem reading GPS-Information from Images
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
Re: [SANSELAN] Problem reading GPS-Information from Images
Posted by Franz <gr...@cip.ifi.lmu.de>.
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 <gr...@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
Re: [SANSELAN] Problem reading GPS-Information from Images
Posted by Charles Matthew Chen <ch...@gmail.com>.
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 <gr...@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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org