I have been used Debian as GIS platform for years. Thanks to Debian.

Yesterday I began to test the codes of my book (Python and Open Source GIS) 
under Debian 11 testing.  https://github.com/bukun/book_python_gis
Now I found an issue.  And a similar link 
: https://stackoverflow.com/questions/65668542/projerror-x-y-z-and-time-must-be-same-size 


As follows codes:


-------------------------------------------------------------------------------------------------------
>>> from mpl_toolkits.basemap import Basemap
>>> para = {'projection': 'tmerc','lat_0': 0,'lon_0': 3,
...     'llcrnrlon': 1.81,
...     'llcrnrlat': 41.58,
...     'urcrnrlon': 1.84,
...     'urcrnrlat': 41.59}
>>>
>>> mymap = Basemap(**para)
Traceback (most recent call last):
&nbsp; File "<stdin&gt;", line 1, in <module&gt;
&nbsp; File "/usr/lib/python3/dist-packages/mpl_toolkits/basemap/__init__.py", 
line 1131, in __init__
&nbsp; &nbsp; self._readboundarydata('gshhs',as_polygons=False)
&nbsp; File "/usr/lib/python3/dist-packages/mpl_toolkits/basemap/__init__.py", 
line 1412, in _readboundarydata
&nbsp; &nbsp; bx, by = self(blons, blats)
&nbsp; File "/usr/lib/python3/dist-packages/mpl_toolkits/basemap/__init__.py", 
line 1192, in __call__
&nbsp; &nbsp; xout,yout = self.projtran(x,y,inverse=inverse)
&nbsp; File "/usr/lib/python3/dist-packages/mpl_toolkits/basemap/proj.py", line 
293, in __call__
&nbsp; &nbsp; outx,outy = self._proj4(x, y, inverse=inverse)
&nbsp; File "/usr/lib/python3/dist-packages/pyproj/proj.py", line 182, in 
__call__
&nbsp; &nbsp; return self.transform(
&nbsp; File "/usr/lib/python3/dist-packages/pyproj/transformer.py", line 488, 
in transform
&nbsp; &nbsp; self._transformer._transform(
&nbsp; File "pyproj/_transformer.pyx", line 477, in 
pyproj._transformer._Transformer._transform
pyproj.exceptions.ProjError: x, y, z, and time must be same size

-------------------------------------------------------------------------------------------------------


Furthermore, i test some other paras. Seems very strange.


Following got same error:


-------------------------------------------------------------------------------------------------------
para = {'projection': 'tmerc','lat_0': 0,'lon_0': 3,
&nbsp; &nbsp; 'llcrnrlon': 1.8,
&nbsp; &nbsp; 'llcrnrlat': 41.5,
&nbsp; &nbsp; 'urcrnrlon': 1.9,
&nbsp; &nbsp; 'urcrnrlat': 41.6}

-------------------------------------------------------------------------------------------------------


Following got no error:


-------------------------------------------------------------------------------------------------------
para = {'projection': 'tmerc','lat_0': 0,'lon_0': 3,
&nbsp; &nbsp; 'llcrnrlon': 1,
&nbsp; &nbsp; 'llcrnrlat': 41,
&nbsp; &nbsp; 'urcrnrlon': 2,
&nbsp; &nbsp; 'urcrnrlat': 42}
para = {'projection': 'tmerc','lat_0': 0,'lon_0': 3,
&nbsp; &nbsp; 'llcrnrlon': 1.8,
&nbsp; &nbsp; 'llcrnrlat': 41,
&nbsp; &nbsp; 'urcrnrlon': 1.9,
&nbsp; &nbsp; 'urcrnrlat': 41}

-------------------------------------------------------------------------------------------------------

Reply via email to