- 浏览: 106901 次
- 性别:
- 来自: 南京
最新评论
-
jirihua:
你好 麻烦你能详细的说下 Mac上 ImageMagick的安 ...
ImageMagic的安装使用 -
java-admin:
看bu懂。
EPSG:4326 代表的是坐标系吗?
EPSG:900913 与 EPSG:4326 转换方法 -
qichunren:
你说的是什么东西啊?是gg的地图吗?要不,发一个截图上来看看啊 ...
OpenLayers Rails Plugin 使用 -
robbin:
szpapas 写道总不能为每个重命令写一个Ruby代码吧,呵 ...
Rubycook 学习心得 -
szpapas:
总不能为每个重命令写一个Ruby代码吧,呵呵。
并且这个脚本是 ...
Rubycook 学习心得
从Google Earth上抓回来的地图是4326坐标系的,JPEG 图片,没有压缩的,质量比较好。但是相应的.map文件的格式如下:
!table
OziExplorer Map Data File Version 2.2
tianhe1.jpg
C:\users\Gecapture\tianhe1.jpg
1 ,Map Code,
WGS 84,WGS 84, 0.0000, 0.0000,WGS 84
Reserved 1
Reserved 2
Magnetic Variation,,,E
Map Projection,Latitude/Longitude,PolyCal,No,AutoCalOnly,No,BSBUseWPX,No
Point01,xy,284,197,in, deg, 23, 9.028140,N, 113, 17.976480,E, grid, , , ,
Point02,xy,8520,1970,in, deg, 23, 8.072580,N, 113, 22.894800,E, grid, , , ,
Point03,xy,8520,4334,in, deg, 23, 6.799800,N, 113, 22.885200,E, grid, , , ,
Point04,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point05,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point06,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point07,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point08,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point09,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point10,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point11,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point12,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point13,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point14,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point15,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point16,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point17,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point18,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point19,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point20,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point21,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point22,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point23,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point24,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point25,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point26,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point27,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point28,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point29,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point30,xy, , ,in, deg, , ,, , ,, grid, , , ,
Projection Setup,,,,,,,,,,
Map Feature = MF ; Map Comment = MC These follow if they exist
Track File = TF These follow if they exist
Moving Map Parameters = MM? These follow if they exist
MM0,Yes
MMPNUM,4
MMPXY,1,0,0
MMPXY,2,9088,0
MMPXY,3,9088,7092
MMPXY,4,0,7092
MMPLL,1, 113.296784, 23.152230
MMPLL,2, 113.387115, 23.152230
MMPLL,3, 113.387115, 23.088601
MMPLL,4, 113.296784, 23.088601
MM1B,1.017826
LL Grid Setup
LLGRID,No,No Grid,Yes,255,16711680,0,No Labels,0,16777215,7,1,Yes,x
Other Grid Setup
GRGRID,No,No Grid,Yes,255,16711680,No Labels,0,16777215,8,1,Yes,No,No,x
MOP,Map Open Position,0,0
IWH,Map Image Width/Height,9088,7092
需要修改成为后缀为.tab的文件才能转换。
!table
!version 300
!charset WindowsSimpChinese
Definition Table
File "tianhe1.jpg"
Type "RASTER"
(113.296784, 23.152230) (0,0) Label "Pt 1",
(113.387115, 23.152230) (9088,0) Label "Pt 2",
(113.296784, 23.088601) (0,7092) Label "Pt 3"
CoordSys Earth Projection 1, 104
Units "degree"
=== set_tab.rb=====
k = 0
File.open(ARGV[0], 'r').each_line do |line|
k = k+1
$filename = line.chomp if k == 2
if line[0..6] == 'MMPXY,3'
ss = line.chomp.split(',')
$width = ss[2]
$height = ss[3]
end
if line[0..6] == 'MMPLL,1'
ss = line.chomp.split(',')
$x0, $y0 = ss[2], ss[3]
end
if line[0..6] == 'MMPLL,3'
ss = line.chomp.split(',')
$x1, $y1 = ss[2], ss[3]
end
end
puts '!version 300'
puts '!charset WindowsSimpChinese'
puts
puts 'Definition Table'
puts " File \"#{$filename}\""
puts " Type \"RASTER\""
puts " (#{$x0},#{$y0}) (0,0) Label \"Pt 1\","
puts " (#{$x1},#{$y0}) (#{$width},0) Label \"Pt 2\","
puts " (#{$x0},#{$y1}) (0,#{$height}) Label \"Pt 3\""
puts ' CoordSys Earth Projection 1, 104'
puts ' Units "degree"'
=== end of ruby script ====
运行:liujun$ ruby set_tab.rb tianhe1.map
!version 300
!charset WindowsSimpChinese
Definition Table
File "tianhe1.jpg"
Type "RASTER"
( 113.296784, 23.152230) (0,0) Label "Pt 1",
( 113.387115, 23.152230) (9088,0) Label "Pt 2",
( 113.296784, 23.088601) (0,7092) Label "Pt 3"
CoordSys Earth Projection 1, 104
Units "degree"
重新定向到 ruby set_tab.rb tianhe1.map > tianhe1.tab
.tab文件准备好之后,就可以用gdalwarp 把坐标系和ERSI的信息加进去生成GeoTiff 图片了。
liujun$ gdalwarp -s_srs EPSG:4326 -of GTiff tianhe1.jpg tt.tif
Creating output file that is 9424P x 6639L.
Processing input file tianhe1.jpg.
0...10...20...30...40...50...60...70...80...90...100 - done.
然后用
liujun$ gdalinfo tt.tif
Driver: GTiff/GeoTIFF
Files: tt.tif
Size is 9424, 6639
Coordinate System is:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.2572235630016,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]
Origin = (113.296784000000031,23.152230000000014)
Pixel Size = (0.000009584844494,-0.000009584844494)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 113.2967840, 23.1522300) (113d17'48.42"E, 23d 9'8.03"N)
Lower Left ( 113.2967840, 23.0885962) (113d17'48.42"E, 23d 5'18.95"N)
Upper Right ( 113.3871116, 23.1522300) (113d23'13.60"E, 23d 9'8.03"N)
Lower Right ( 113.3871116, 23.0885962) (113d23'13.60"E, 23d 5'18.95"N)
Center ( 113.3419478, 23.1204131) (113d20'31.01"E, 23d 7'13.49"N)
Band 1 Block=9424x1 Type=Byte, ColorInterp=Red
Band 2 Block=9424x1 Type=Byte, ColorInterp=Green
Band 3 Block=9424x1 Type=Byte, ColorInterp=Blue
然后就可以用 gdal2tiles.py 来生成cahce文件了。由于边界问题,所以还不是特别规整,这个可以尝试。
liu-juns-macbook-pro:Gecapture liujun$ gdal2tiles.py tt.tif ./tt_out/
Generating Base Tiles:
0...10...20...30...40...50...60...70...80...90...100 - done.
Generating Overview Tiles:
0...10...20...30...40...50...60...70...80...90...100 - done.
1km的高度,就是17级的。
如果要18, 19甚至更高级别的图片就需要重新下载更详细的Google图片
如果要加到OpenLayers 里面,可以先在geoserver里面登记一下,然后再用相同的方法处理一下。
!table
OziExplorer Map Data File Version 2.2
tianhe1.jpg
C:\users\Gecapture\tianhe1.jpg
1 ,Map Code,
WGS 84,WGS 84, 0.0000, 0.0000,WGS 84
Reserved 1
Reserved 2
Magnetic Variation,,,E
Map Projection,Latitude/Longitude,PolyCal,No,AutoCalOnly,No,BSBUseWPX,No
Point01,xy,284,197,in, deg, 23, 9.028140,N, 113, 17.976480,E, grid, , , ,
Point02,xy,8520,1970,in, deg, 23, 8.072580,N, 113, 22.894800,E, grid, , , ,
Point03,xy,8520,4334,in, deg, 23, 6.799800,N, 113, 22.885200,E, grid, , , ,
Point04,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point05,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point06,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point07,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point08,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point09,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point10,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point11,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point12,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point13,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point14,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point15,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point16,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point17,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point18,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point19,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point20,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point21,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point22,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point23,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point24,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point25,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point26,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point27,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point28,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point29,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point30,xy, , ,in, deg, , ,, , ,, grid, , , ,
Projection Setup,,,,,,,,,,
Map Feature = MF ; Map Comment = MC These follow if they exist
Track File = TF These follow if they exist
Moving Map Parameters = MM? These follow if they exist
MM0,Yes
MMPNUM,4
MMPXY,1,0,0
MMPXY,2,9088,0
MMPXY,3,9088,7092
MMPXY,4,0,7092
MMPLL,1, 113.296784, 23.152230
MMPLL,2, 113.387115, 23.152230
MMPLL,3, 113.387115, 23.088601
MMPLL,4, 113.296784, 23.088601
MM1B,1.017826
LL Grid Setup
LLGRID,No,No Grid,Yes,255,16711680,0,No Labels,0,16777215,7,1,Yes,x
Other Grid Setup
GRGRID,No,No Grid,Yes,255,16711680,No Labels,0,16777215,8,1,Yes,No,No,x
MOP,Map Open Position,0,0
IWH,Map Image Width/Height,9088,7092
需要修改成为后缀为.tab的文件才能转换。
!table
!version 300
!charset WindowsSimpChinese
Definition Table
File "tianhe1.jpg"
Type "RASTER"
(113.296784, 23.152230) (0,0) Label "Pt 1",
(113.387115, 23.152230) (9088,0) Label "Pt 2",
(113.296784, 23.088601) (0,7092) Label "Pt 3"
CoordSys Earth Projection 1, 104
Units "degree"
=== set_tab.rb=====
k = 0
File.open(ARGV[0], 'r').each_line do |line|
k = k+1
$filename = line.chomp if k == 2
if line[0..6] == 'MMPXY,3'
ss = line.chomp.split(',')
$width = ss[2]
$height = ss[3]
end
if line[0..6] == 'MMPLL,1'
ss = line.chomp.split(',')
$x0, $y0 = ss[2], ss[3]
end
if line[0..6] == 'MMPLL,3'
ss = line.chomp.split(',')
$x1, $y1 = ss[2], ss[3]
end
end
puts '!version 300'
puts '!charset WindowsSimpChinese'
puts
puts 'Definition Table'
puts " File \"#{$filename}\""
puts " Type \"RASTER\""
puts " (#{$x0},#{$y0}) (0,0) Label \"Pt 1\","
puts " (#{$x1},#{$y0}) (#{$width},0) Label \"Pt 2\","
puts " (#{$x0},#{$y1}) (0,#{$height}) Label \"Pt 3\""
puts ' CoordSys Earth Projection 1, 104'
puts ' Units "degree"'
=== end of ruby script ====
运行:liujun$ ruby set_tab.rb tianhe1.map
!version 300
!charset WindowsSimpChinese
Definition Table
File "tianhe1.jpg"
Type "RASTER"
( 113.296784, 23.152230) (0,0) Label "Pt 1",
( 113.387115, 23.152230) (9088,0) Label "Pt 2",
( 113.296784, 23.088601) (0,7092) Label "Pt 3"
CoordSys Earth Projection 1, 104
Units "degree"
重新定向到 ruby set_tab.rb tianhe1.map > tianhe1.tab
.tab文件准备好之后,就可以用gdalwarp 把坐标系和ERSI的信息加进去生成GeoTiff 图片了。
liujun$ gdalwarp -s_srs EPSG:4326 -of GTiff tianhe1.jpg tt.tif
Creating output file that is 9424P x 6639L.
Processing input file tianhe1.jpg.
0...10...20...30...40...50...60...70...80...90...100 - done.
然后用
liujun$ gdalinfo tt.tif
Driver: GTiff/GeoTIFF
Files: tt.tif
Size is 9424, 6639
Coordinate System is:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.2572235630016,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]
Origin = (113.296784000000031,23.152230000000014)
Pixel Size = (0.000009584844494,-0.000009584844494)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 113.2967840, 23.1522300) (113d17'48.42"E, 23d 9'8.03"N)
Lower Left ( 113.2967840, 23.0885962) (113d17'48.42"E, 23d 5'18.95"N)
Upper Right ( 113.3871116, 23.1522300) (113d23'13.60"E, 23d 9'8.03"N)
Lower Right ( 113.3871116, 23.0885962) (113d23'13.60"E, 23d 5'18.95"N)
Center ( 113.3419478, 23.1204131) (113d20'31.01"E, 23d 7'13.49"N)
Band 1 Block=9424x1 Type=Byte, ColorInterp=Red
Band 2 Block=9424x1 Type=Byte, ColorInterp=Green
Band 3 Block=9424x1 Type=Byte, ColorInterp=Blue
然后就可以用 gdal2tiles.py 来生成cahce文件了。由于边界问题,所以还不是特别规整,这个可以尝试。
liu-juns-macbook-pro:Gecapture liujun$ gdal2tiles.py tt.tif ./tt_out/
Generating Base Tiles:
0...10...20...30...40...50...60...70...80...90...100 - done.
Generating Overview Tiles:
0...10...20...30...40...50...60...70...80...90...100 - done.
1km的高度,就是17级的。
如果要18, 19甚至更高级别的图片就需要重新下载更详细的Google图片
如果要加到OpenLayers 里面,可以先在geoserver里面登记一下,然后再用相同的方法处理一下。
发表评论
-
收藏图片
2010-09-09 00:07 0LITU100-2010.08.13 祖儿 - 3 http ... -
VMWare 7.1 key
2010-07-10 22:39 4326VMware Workstation 7.1注册机(序列号/注 ... -
iPhone IDP 申请
2010-07-10 06:34 1654现在确实好像不需要激活码了。 申请后,一天就受到扣款的邮件, ... -
Install R on mac OSX
2010-02-10 12:22 11421. 下载 安装 R R-2.10.1.pkg ... -
Macbook Pro 休眠模式
2009-12-11 09:09 31570 - 安全模式 1 - 直接写到硬盘,恢复也从硬盘恢复 ... -
100G Ethernet
2009-11-30 08:41 1028100 GE 模块 PHY 40 Gigabit E ... -
Ruby Tutorial from _why
2009-11-27 09:31 973HTML version http://mislav.uniq ... -
Martians
2009-11-26 12:54 743Prefix bits of 0.0.0.0 /8 were ... -
make point in postgres
2009-11-20 16:41 681select astext(transform(setsrid ... -
ruby multi thread 多线程 编程
2009-11-13 18:29 2147$key = 0 def thread_draw(i ... -
ubuntu mongrel-cluster nginx
2009-11-13 08:34 10491. custer gem install mongre ... -
OpenLayers 添加 map 移动后的事件
2009-10-01 23:13 1328其实很简单了,就是增加一个Openlayers map 的 “ ... -
Subversion Cheat Sheet
2009-10-01 14:05 2395This Subversion cheat sheet was ... -
c2k license
2009-09-29 07:29 857license.key.signature = 60q0453 ... -
tar 的用法
2009-09-19 08:10 639转自:http://dev.csdn.net/ar ... -
Snow Leopard x86_64 安装Postgres
2009-09-17 10:50 11501. 安装snow leopard 64位的postgres ... -
ipTables portforwarding 的安装方法
2009-07-04 22:52 1120下面是ipTables 的安装方法,供日后参考。 Iptab ... -
CPAN Install 过程
2009-04-21 18:15 14111. 解压缩, tar zxvf yourmodul ... -
SCP 的用法
2009-03-01 15:21 1340scp 就是 secure copy, 是用来进行远程文件拷贝 ... -
PostGis 查询
2009-02-17 11:38 19681. 查询一个网格内的所有Feature select b. ...
相关推荐
在某些应用场景中,可能需要通过URL来直接访问Google Earth中的特定图片,这就涉及到了"Google Earth URL 图片换算"的知识。 首先,我们要了解Google Earth的图像系统是如何工作的。Google Earth的图像数据是分块...
Google Earth API 开发 本节将详细介绍 Google Earth API 的开发,...但是需要注意的是,基于 Google Earth 的应用也有一定的风险,如政策因素,国家测绘管理部门对于 Google Earth 提供的卫星图片的态度还不够明朗。
2. **StitchMaps.exe** - 这很可能是该软件的可执行文件,用户通过运行这个文件启动Google Earth图片下载器,进行实际的下载和管理任务。 3. **Lz0.nfo** - 这通常在压缩包中包含有关软件的详细信息,如开发人员、...
本教程旨在讲解 Google Earth 二次开发的基础知识,帮助读者了解 Google Earth 的主要应用、产品分类、数据来源、简单操作、功能演示、功能介绍、位置查找、地标添加、管理、分享、测量功能、图片叠加等方面的知识。...
压缩包中的"GoogleEarth5.rar"文件很可能是Google Earth 5的安装程序,为了使用截图工具,你需要先安装这个版本的Google Earth。安装过程通常包括下载文件,双击运行安装程序,按照提示步骤操作,最后完成安装。记得...
3. **处理地形高程数据**:Google Earth的地形通常是以DEM(数字高程模型)的形式存储,这种数据格式包含每个像素的海拔高度。可以下载Google Earth的DEM数据,或者从其他公开数据源(如USGS)获取。然后,利用GIS...
Google Earth最初源自于2004年10月Google收购的Keyhole公司。Keyhole在其早期产品中就已经开发了一套内部使用的COM接口,但并未对外开放。随着Google Earth的推出,Google基于Keyhole的技术基础,于2005年6月正式...
【GooglEarth图片采集工具】是一款专为用户从Google Earth平台获取高清晰度卫星图片的实用工具。这款软件允许用户自定义飞行高度和划定特定的地理区域,以便系统化地下载并保存这些区域的卫星图像至本地计算机。通过...
总的来说,GETScreen这款工具巧妙地结合了谷歌地球的地理信息展示功能和批量处理技术,为用户提供了便利的截图解决方案。使用时,只需按照上述步骤进行设置,就能顺利进行批量截图。值得注意的是,由于谷歌地球的...
综上所述,"GEDemo5_googleearth_GoogleEarth、C#_经纬度_"项目涵盖了使用C#与Google Earth API集成的基本步骤,包括加载地球、保存地图状态、根据经纬度进行定位、调整视角以及执行彩色截图等功能。这样的应用对于...
- **新技术解决方案**:Google Earth与World Wind的出现打破了传统Web GIS的数据发布模式,通过传输预生成的影像图片和XML(KML)文档来减轻服务器和网络的压力。 #### 二、Google Earth技术分析 - **发布时间**:...
- **图像覆盖**: 将第三方图片放置于 Google Earth 上,覆盖原有的卫星图像。 - **测量工具**: 测量两点或多点之间的距离或计算特定区域的面积。 - **电子邮件分享**: 通过邮件分享当前视图。 - **打印功能**: 打印...
**Google Earth Pro for Windows:深度探索与应用** Google Earth Pro是一款强大的地理信息系统(GIS)软件,专为Windows操作系统设计,让用户能够在全球范围内进行三维虚拟浏览、地图制作、数据分析等操作。这款...
**Google Earth专业版详解** Google Earth专业版是一款强大的地理信息系统(GIS)软件,它提供了前所未有的全球三维视图,让用户可以探索世界上的每一个角落。这款软件最初定价为400美元,但现在已经对用户免费开放...
"googl earth图片下载"这一主题涉及到如何从Google Earth获取并保存图像,以便于离线查看或进一步处理。下面我们将详细探讨这个过程,以及可能涉及的技术点。 首先,`GEtScreen`这个标签可能是指一种利用屏幕截图的...
在压缩包中包含的"googleearth截图"文件,很可能是用户已经截取并保存的多个地理位置的图片。这些图片可以用于项目报告、规划分析、教学演示等多种用途。用户可以将它们插入到文档、演示文稿或网站中,以便于他人...
通过先进的图像处理技术,谷歌将这些多源数据整合成无缝衔接的全球覆盖图层,使得用户可以清晰地看到地球上的山脉、河流、城市和自然景观。同时,谷歌地球还结合了精确的地形数据,提供海拔高度、地形起伏等信息,使...
Google Earth 教程 Google Earth 是一个功能强大且流行的虚拟地球软件,它允许用户探索地球、查看卫星图像、查找特定地点、创建个人地标等。下面是 Google Earth 的使用教程,涵盖了软件界面、操作技巧、快速定位、...