matplotlib / matplotlib/basemap

rotpole projection to ESRI shape file

未关闭
#306 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Python
星标
817
派生
395
PR 合并指标
30 天内没有已合并 PR

描述

Hi:

Does anyone know how to convert rotpole projection to ESRI format, to write data into a shape file?

I tried to do it using basemap.proj4string, and then pycrs or gdal, but there are some things missing from the proj4string...

I've added +ellps, but +o_proj=longlat +proj=ob_tran do not seem to be recognized...

Here is the proj4 I am trying to use:

+R=6370997.0 +lon_0=-97.0 +o_lat_p=42.5 +units=m +proj=ob_tran +o_lon_p=180.0 +o_proj=longlat +ellps=WGS84

pycrs complains that it does not know the specified name:

```
Traceback (most recent call last):
File "/Users/huziy/skynet2/RESCUE/skynet3_rech1/huziy/Netbeans Projects/Python/RPN/src/crcm5/mh_domains/show_domain_with_drainage_area.py", line 213, in
main()
File "/Users/huziy/skynet2/RESCUE/skynet3_rech1/huziy/Netbeans Projects/Python/RPN/src/application_properties.py", line 15, in wrapper
func(*args, **kwargs)
File "/Users/huziy/skynet2/RESCUE/skynet3_rech1/huziy/Netbeans Projects/Python/RPN/src/crcm5/mh_domains/show_domain_with_drainage_area.py", line 203, in main
crs = pycrs.parser.from_proj4(bmp.proj4string + " +ellps={}".format("WGS84"))
File "/Users/huziy/virtualenvs/py3.4/lib/python3.4/site-packages/pycrs/parser.py", line 565, in from_proj4
raise Exception("The specified projection name could not be found")
Exception: The specified projection name could not be found
```

Below is my test code (the pj=basemap.proj4string + " +ellps=WGS84"):

``` python
import pycrs
pj = "+R=6370997.0 +lon_0=-97.0 +o_lat_p=42.5 +units=m +proj=ob_tran +o_lon_p=180.0 +o_proj=longlat +ellps=WGS84"
crs = pycrs.parser.from_proj4(pj)
print(crs.to_esri_wkt())
```

Cheers

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先运行提供的 Python 代码片段,并结合报告中提到的 pycrs 和 GDAL 转换路径检查 Basemap 的 proj4string 输出。该 issue 没有指定 Basemap 的源文件或测试;要视为完成,需要确认在 ESRI shapefile 输出中处理此 rotpole 投影的方法,或者在不支持该投影的情况下记录这一限制。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
data-visualization
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
15/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。