如何将纬度/经度(以度为单位)转换为 BBOX,其中 SRS=EPSG:27700
有人知道如何转换纬度、经度以度数来定义 BBOX
其中 SRS=EPSG:27700
吗?
我正在尝试使用如下 URL 调用 WMS 服务(不是真正的链接): http://mysecretmappingserver.com/wms?user=myuser&pwd=mypassword&VERSION=1.1.1&REQUEST=GetMap&LAYERS =ap25cm&STYLES=&SRS=EPSG:27700&BBOX=229096,231675,229296,231875&width=400&height=400
任何语言都可以; C# 更好。
Spacedman 一直在试图帮助我,但我似乎无法让 Proj4Net 为我工作 - 我确信,我所有 - 但如果有人知道 Proj4Net 或所涉及的数学,那可能变得更好...
Anyone know how to convert latitude, longitude in degrees to define a BBOX
where SRS=EPSG:27700
?
I am trying to call a WMS service with a URL like following (not a real link):
http://mysecretmappingserver.com/wms?user=myuser&pwd=mypassword&VERSION=1.1.1&REQUEST=GetMap&LAYERS=ap25cm&STYLES=&SRS=EPSG:27700&BBOX=229096,231675,229296,231875&width=400&height=400
Any language would be fine; C# preferable.
Spacedman has been trying to help me, but I can't seem to get Proj4Net to work for me - all me, I'm sure - but if someone knows either Proj4Net or the math involved, that might be better...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要使用您选择的语言的 PROJ.4 投影库的接口。例如,在 R 中,它位于 rgdal 包中:
epsg:4326 中的一些点(1,1 到 2,2 度):
瞧:
Proj.4 文档在这里:
这是 osgeo.org/proj/" rel="nofollow">http://trac.osgeo.org/proj/
由于这是 OSGB,可能更好的例子是在英国:这是伦敦市中心的一个点:
You need an interface to the PROJ.4 projections library in your language of choice. In R, for example, its in the rgdal package:
Here's some points (1,1 to 2,2 degrees) in epsg:4326:
and voila:
Proj.4 docs here:
http://trac.osgeo.org/proj/
Since this is OSGB, probably a better example would be in the UK: here's a point in central london:
我推荐
ogr2ogr
,它可以在投影之间进行转换。我已将它安装在我的 Mac 上,并且可以绑定到 Python 和许多其他语言。您也可以在命令行上使用它。主页是http://www.gdal.org/ogr2ogr.htmlI recommend
ogr2ogr
, which among other things can convert between projections. I have it installed on my Mac, and there are binding e.g. to Python and many other languages. You can also use it on the commandline. Homepage is http://www.gdal.org/ogr2ogr.html