java代码逐步解析照片拿到gps位置数据,附上步骤讲解,附上源代码和jar包依赖
第一,检查你图片是否是高清原图;
第二,检查你的图片是否来自iphone设备;
第三,检查你拍照片时,是否打开了gps;
三者缺一不可
a:需要的jar包:
b:开发环境
1.maven 引入jar包
2.jdk 1.8
3.windows os
c:核心代码
d:照片信息提取结果:
开始读取图片信息…
[jpeg] compression type – baline
[jpeg] data precisdq官网加盟ion – 8 bits
[jpeg] image height – 3456 pixels
[jpeg] image width – 4608 pixels
[jpeg] number of components – 3
[jpeg] component 1 – y component: quantizat晚会主题ion table 0, sampling factors 2 horiz/2 vert
[jpeg] component 2 – cb component: quantization table 1, sampling factors 1 horiz/1 vert
[jpeg] component 3 – cr component: quantization table 1, sampling factors 1 horiz/1 vert
[exif ifd0] image width – 4608 pixels
[exif ifd0] image height – 3456 pixels
[exif ifd0] make – oneplus
[exif ifd0] model – oneplus a6010
[exif ifd0] orientation – right side, top (rotate 90 cw)
[exif ifd0] x resolution – 72 dots per inch
[exif ifd0] y resolution – 72 dots per inch
[exif ifd0] resolution unit – inch
[exif ifd0] date/time – 2019:09:03 10:41:29
[exif ifd0] ycbcr positioning – center of pixel array
[exif subifd] exposure time – 1/1445 c
[exif subifd] f-number – f/1.7
[exif subifd] exposure program – program normal
[exif subifd] iso speed ratings – 100
[exif subifd] exif version –bus的复数形式; 2.20
[exif subifd] date/time original – 2019:09:03 10:41:29
[exif subifd] date/time digitized – 2019:09:03 10:41:29
[exif subifd] components configuration – ycbcr
[exif subifd] shutter speed value – 1/1444 c
[exif subifd] aperture value – f/1.7
[exif subifd] brightness value – 3.9
[exif subifd] exposure bias value – 0 ev
[exif subifd] max aperture value – f/1.7
[exif subifd] metering mode – center weighted average
[exif subifd] white balance – unknown
[exif subifd] flash – flash did not fire, auto
[exif subifd] focal length – 4.3 mm
[exif subifd] sub-c time – 260556
[exif subifd] sub-c time origi蚁力nal – 260556
[exif subifd] sub-c time digitized – 260556
[exif subifd] flashpix version – 1.00
[exif subifd] color space – srgb
[exif subifd] exif image width – 4608 pixels
[exif subifd] exif image height – 3456 pixels
[exif subifd] nsing method – (not defined)
[exif subifd] scene type – directly photographed image
[exif subifd] exposure mode – auto exposure
[exif subifd] white balance mode – auto white balance
[exif subifd] focal length 35 – 25 mm
[exif subifd] scene capture type – standard
[interoperability] interoperability index – recommended exif interoperability rules (exifr98)
[interoperability] interoperability version – 1.00
[gps] gps latitude ref – n
[gps] gps latitude – 30° 18′ 31.31″
[gps] gps longitude ref – e
[gps] gps longitude – 120° 20′ 36.31″
[gps] gps altitude ref – a level
[gps] gps altitude – 0 metres
[gps] gps time-stamp – 02:41:28.000 utc
[gps] gps processing method – cellid
[gps] gps date stamp – 2019:09:03
[exif thumbnail] exif image width – 320 pixels
[exif thumbnail] exif image height – 240 pixels
[exif thumbnail] compression – jpeg (old-style)
[exif thumbnail] orientation – right side, top (rotate 90 cw)
[exif thum小学体育教学计划bnail] x resolution – 72 dots per inch
[exif thumbnail] y resolution – 72 dots per inch
[exif thumbnail] resolution unit – inch
[exif thumbnail] thumbnail offt – 1104 bytes
[exif thumbnail] thumbnail length – 38449 bytes
[xmp] xmp value count – 5
[huffman] number of tables – 4 huffman tables
[file] file name – 18.jpg
[file] file size – 7027316 bytes
[file] file modified date – 星期二 九月 03 10:55:39 +08:00 2019
图片信息读取完成!
有意义的信息截取:
[gps] gps latitude ref – n
[gps] gps latitude – 30° 18′ 31.31″ 维度
[gps] gps longitude ref – e
[gps] gps longitude – 120° 20′ 36.31″ 经度
[gps] gps altitude ref – a level
[gps] gps altitude – 0 metres
[gps] gps time-stamp – 02:41:28.000 utc 拍摄时间
[gps] gps processing method – cellid
[gps] gps date stamp – 2019:09:03 拍摄时间[exif ifd0] make – oneplus 设备信息
[exif ifd0] model – oneplus a6010 设备型号
根据经纬度查询结果:
原文链接和源码下载地址 原文链接:/d/file/titlepic/11451009.html />gps位置查询链接:http://www.gpsspg.com/maps.htm
经纬度格式转化链接:http://www.minigps.net/fc.html
代码下载地址:[源码地址]/d/file/titlepic/p
本文发布于:2023-04-06 01:44:45,感谢您对本站的认可!
本文链接:https://www.wtabcd.cn/fanwen/zuowen/73c3b583dc42d44ef81663cfd438f807.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文word下载地址:Java解析照片拿到GPS位置数据的详细步骤.doc
本文 PDF 下载地址:Java解析照片拿到GPS位置数据的详细步骤.pdf
留言与评论(共有 0 条评论) |