matplotlib / matplotlib/basemap
scale created by drawmapscale seems incorrect
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 817
- フォーク
- 395
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Issue description
Drawing a scale in basemap using 'drawmapscale' results in a scale which is not correct. It seems the bar is about 1.6 times to short. So, a scale with the indication 10km above it is actually only about 6.25 km long.
The two attachments show:
- a basemap plot (code below) for a region around Belgium. Belgium is about 230 km width, when measured due east starting from the most southern point of the coastline. As can be seen, the ruler is to small, it does not go from coast till the eastern border.
- a screenshot from google earth showing the same area with a measurement, confirming that the country is indeed 230 km wide.
Code which shows the issue:
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
map = Basemap(projection='merc', lat_0 = 50, lon_0 = 4,resolution = 'h', area_thresh = 0.1,
llcrnrlon=1.75, llcrnrlat=49.0,urcrnrlon=7, urcrnrlat=52)
map.drawcoastlines()
map.drawcountries()
map.drawmapboundary(fill_color = 'lightblue')
map.fillcontinents(color = 'white',lake_color = 'lightblue')
map.drawmapscale(4.27,51.11,4.5,50.89,228, barstyle='fancy', units='km', labelstyle='simple',\
fillcolor1='w', fillcolor2='#555555', fontcolor='#555555')
plt.show(block=False)
I tried similar plottings in nautical mile, meters, etc, all with the same problem: the ruler shows the correct numbers, but is 1.6x to small.
I also tried with much smaller scales (eg 10 km),other barstyle, etc and referenced them to known distances on a map, and the same issue occurs.
Technical info:
Python version: 2.7.6
matplotlib version: 1.3.1
Basemap 1.0.7 + dfsg-1
OS: linux Mint 17 Qiana (64-bit version)
Installation method: all packages installed automatically during Mint installation or via Synaptic package manager using the official repository
no customization


コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
提供された Python の再現コードと Basemap drawmapscale エントリポイントから始め、描画されたスケールバーを記載された 228 km の距離と比較し、メルカトル投影がどのように扱われているかを確認します。再現されたベルギーの地図全体で、スケールバーに表示される長さが要求された実際の距離と一致し、関連する単位とバーのスタイルが正しいままであれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100