Basemap does not respects False Easting or False Northing
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- data-visualization
Research direction
Start at the Basemap constructor and EPSG lookup using the entry for 22181 in basemap/data/epsg; reproduce the tmerc example and inspect how projection parameters become proj4string. Confirm that EPSG-provided x_0 and y_0 are retained and determine how equivalent constructor arguments should be handled. Done means the example preserves both false offsets and regression coverage verifies them.
Written by the indexing model from the issue text.
Description
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)
- Dominant language
- Python
- Stars
- 817
- Forks
- 395
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from matplotlib/basemap
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
matplotlib/basemap#368 ·
-
Python 3.14 wheels Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
matplotlib/basemap#652 · 2 comments · 5 reactions ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
matplotlib/basemap#649 · 2 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
matplotlib/basemap#646 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
matplotlib/basemap#645 · 2 comments ·
All issues in matplotlib/basemap
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
canonical/paas-charm#368 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
tech debt
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
StevenBlack/hosts#3256 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
qualcomm/qai-appbuilder#275 ·