Comments (6)
I have disabled the inverse hammer projection test in the rpm build for fedora, and after this all remaining tests run fine for rawhide (upcoming fedora 24). This one will have proj version 4.9.2
For fedora 23, which has proj version 4.9.1, there are 2 failing tests related to the hammer projection (both for python2 and python3). See the details in this log file:
https://kojipkgs.fedoraproject.org//work/tasks/1374/12551374/build.log
I guess this also is related to the missing inverse hammer in these proj versions.
The output for the failing tests is:
Trying:
p = Proj(proj='hammer') # hammer proj and inverse
Expecting nothing
File "/builddir/build/BUILDROOT/pyproj-1.9.5.1-1.fc23.x86_64/usr/lib64/python3.4/site-packages/pyproj/init.py", line 324, in pyproj.Proj.new
Failed example:
p = Proj(proj='hammer') # hammer proj and inverse
Exception raised:
Traceback (most recent call last):
File "/usr/lib64/python3.4/doctest.py", line 1318, in run
compileflags, 1), test.globs)
File "<doctest pyproj.Proj.__new[20]>", line 1, in
p = Proj(proj='hammer') # hammer proj and inverse
File "/builddir/build/BUILDROOT/pyproj-1.9.5.1-1.fc23.x86_64/usr/lib64/python3.4/site-packages/pyproj/init.py", line 355, in new
return _proj.Proj.new(self, projstring)
File "_proj.pyx", line 84, in _proj.Proj.cinit (_proj.c:1156)
raise RuntimeError(pj_strerrno(err))
RuntimeError: b'major axis or radius = 0 or not given'
Trying:
x,y = p(-30,40)
Expecting nothing
ok
Trying:
'x=%12.3f y=%12.3f' % (x,y)
Expecting:
'x=-2711575.083 y= 4395506.619'
File "/builddir/build/BUILDROOT/pyproj-1.9.5.1-1.fc23.x86_64/usr/lib64/python3.4/site-packages/pyproj/init.py", line 326, in pyproj.Proj.new
Failed example:
'x=%12.3f y=%12.3f' % (x,y)
Expected:
'x=-2711575.083 y= 4395506.619'
Got:
'x=16013975.139 y=19338537.497'
from pyproj.
One option would be to move these inverse hammer tests to unittest and skip it the inverse hammer tests when ran like so:
python unittests/test.py --skip-inv-hammer
That would allow package maintainers to be able to ensure the rest of the functionality stays in the package. It would retain the useful unittest.
from pyproj.
Yes, that would be a nice option (if the plan is to move all tests to the unittests anyway).
A more general concern I think is that it seems possible to have undefined inverse projections in proj. I have no detailed knowledge of the proj source code, but if more projections exist without their inverse, then this may trigger the same problem. First step would be to add unittests for all projections, and their inverse I think.
from pyproj.
It appears 21 projections currently in PROJ.4 have no inverse function.
I've used unittests to test that bug fixes remain fixed. Unittest does have the ability to skip test if certain conditions aren't right.
from pyproj.
Yes, and I see devel version of proj has added a check for NULL pointer of P->inv and P->fwd in the source files pj_inv.c and pj_fwd.c. These checks are present in the bundled c-code but not in proj releases 4.9.1 and 4.9.2. This will cause segmentation faults if the pyproj module is build without bundles sources with these proj versions. I just tested, and for example the 'airy' projection also shows this segmentation fault.
from pyproj.
PR #44 was merged, which fixed this issue. The repository no longer has this issue. Closing.
from pyproj.
Related Issues (20)
- seg fault on CRS.to_authority for certain IAU projection codes HOT 6
- BUG: Cython 3 Compatibility HOT 9
- Transformer: EPSG:27700 to EPSG:4978 (3D) not returning PROJ string HOT 5
- DEP: Add Python 3.12
- Transformer creation broken with empty area of interest
- DEP: PROJ 9.3
- Leading space in WKT raises `CRSError` HOT 9
- Functions of `loxodrome` or `rhumb line` is needed HOT 6
- Help with PROJ 9.3 CRS comparison issue HOT 26
- Request: release a patch version that pins cython<3.0 HOT 24
- error installl pyproj==3.2.1 on debian:12 HOT 3
- UserWarning: Valid PROJ data directory not found HOT 16
- What happened to the `pyproj/aoi.py` module in releases? HOT 1
- Deprecation warning when transforming a single point enclosed in numpy array HOT 1
- LibTiff Vulnerabilities and Dependencies HOT 4
- DOC: Converting from fiona CRS to pyproj.crs.CRS HOT 7
- Add JSON serializeability with PROJJSON? HOT 7
- to_CF for polar_stereographic, with latitude_true_scale, should include latitude_of_projection_origin HOT 2
- Reverse transformation does not produce initial coordinates
- DeprecationWarning: pkg_resources is deprecated as an API. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyproj.