matplotlib / matplotlib/basemap

Basemap does not respects False Easting or False Northing

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

还没有人认领这个 Issue。

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

描述

While creating a basemap from an EPSG code with the x_0 or y_0 (False Easting and False Northing), the Basemap instance does not respect those values. I tried with 'tmerc' projections only because it's of my interest. I leave an example:

Suppose I want to use this EPSG basemap:

# POSGAR 94 / Argentina 1
<22181> +proj=tmerc +lat_0=-90 +lon_0=-72 +k=1 +x_0=1500000 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>

It can be found in "basemap/data/epsg" file.

Then I create the basemap and print its parameters:

from mpl_toolkits.basemap import Basemap

lon_min, lat_min = -75, -45
lon_max, lat_max = -70, -40
bm = Basemap(epsg=22181,
             llcrnrlon=lon_min, llcrnrlat=lat_min,
             urcrnrlon=lon_max, urcrnrlat=lat_max)

print bm.proj4string

I get the following output:
+a=6378137.0 +b=6356752.31425 +k_0=1.0 +y_0=-5012640.49452 +lon_0=-72.0 +proj=tmerc +x_0=236540.642361 +units=m +lat_0=-90.0

As we can see, the Basemap overrides the false easting and false northing information:
+x_0=236540.642361 +y_0=-5012640.49452

It would be great that the Basemap respect those values and even better if they can be passed as arguments while initializing it in the usual way (without using EPSG codes), for example:

bm = Basemap(projection='tmerc',
             lon_0=lon_0, lat_0=lat_0,
             x_0=x_0, y_0=y_0
             llcrnrlon=lon_min, llcrnrlat=lat_min,
             urcrnrlon=lon_max, urcrnrlat=lat_max)

贡献指南

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

从这里开始

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

调研方向

从 Basemap 构造函数和使用 basemap/data/epsg 中 22181 条目的 EPSG 查找开始;重现 tmerc 示例,并检查投影参数如何变为 proj4string。确认 EPSG 提供的 x_0 和 y_0 会被保留,并确定应如何处理等效的构造函数参数。完成的标准是示例保留两个假偏移量,并且回归覆盖验证它们。

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

评估

技术栈
python
领域
data-visualization
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

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