pygeodesy 24.11.11__py2.py3-none-any.whl → 25.1.5__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {PyGeodesy-24.11.11.dist-info → PyGeodesy-25.1.5.dist-info}/METADATA +34 -35
- PyGeodesy-25.1.5.dist-info/RECORD +118 -0
- {PyGeodesy-24.11.11.dist-info → PyGeodesy-25.1.5.dist-info}/WHEEL +1 -1
- pygeodesy/__init__.py +19 -19
- pygeodesy/__main__.py +1 -1
- pygeodesy/albers.py +5 -5
- pygeodesy/auxilats/_CX_4.py +1 -1
- pygeodesy/auxilats/_CX_6.py +1 -1
- pygeodesy/auxilats/_CX_8.py +1 -1
- pygeodesy/auxilats/_CX_Rs.py +1 -1
- pygeodesy/auxilats/__init__.py +1 -1
- pygeodesy/auxilats/__main__.py +1 -1
- pygeodesy/auxilats/auxAngle.py +5 -5
- pygeodesy/auxilats/auxDLat.py +6 -6
- pygeodesy/auxilats/auxDST.py +2 -2
- pygeodesy/auxilats/auxLat.py +5 -5
- pygeodesy/auxilats/auxily.py +2 -2
- pygeodesy/azimuthal.py +5 -5
- pygeodesy/basics.py +60 -8
- pygeodesy/booleans.py +1 -1
- pygeodesy/cartesianBase.py +22 -61
- pygeodesy/clipy.py +1 -1
- pygeodesy/constants.py +5 -5
- pygeodesy/css.py +1 -1
- pygeodesy/datums.py +1 -1
- pygeodesy/deprecated/__init__.py +2 -2
- pygeodesy/deprecated/bases.py +1 -1
- pygeodesy/deprecated/classes.py +86 -2
- pygeodesy/deprecated/consterns.py +1 -1
- pygeodesy/deprecated/datum.py +5 -5
- pygeodesy/deprecated/functions.py +42 -8
- pygeodesy/deprecated/nvector.py +1 -1
- pygeodesy/deprecated/rhumbBase.py +1 -1
- pygeodesy/deprecated/rhumbaux.py +1 -1
- pygeodesy/deprecated/rhumbsolve.py +1 -1
- pygeodesy/deprecated/rhumbx.py +1 -1
- pygeodesy/dms.py +1 -1
- pygeodesy/ecef.py +53 -56
- pygeodesy/elevations.py +1 -1
- pygeodesy/ellipsoidalBase.py +3 -3
- pygeodesy/ellipsoidalBaseDI.py +1 -1
- pygeodesy/ellipsoidalExact.py +1 -1
- pygeodesy/ellipsoidalGeodSolve.py +1 -1
- pygeodesy/ellipsoidalKarney.py +1 -1
- pygeodesy/ellipsoidalNvector.py +1 -1
- pygeodesy/ellipsoidalVincenty.py +6 -5
- pygeodesy/ellipsoids.py +4 -5
- pygeodesy/elliptic.py +6 -6
- pygeodesy/epsg.py +1 -1
- pygeodesy/errors.py +1 -1
- pygeodesy/etm.py +5 -5
- pygeodesy/fmath.py +18 -17
- pygeodesy/formy.py +409 -555
- pygeodesy/frechet.py +29 -86
- pygeodesy/fstats.py +1 -1
- pygeodesy/fsums.py +32 -33
- pygeodesy/gars.py +1 -1
- pygeodesy/geodesici.py +7 -7
- pygeodesy/geodesicw.py +1 -1
- pygeodesy/geodesicx/_C4_24.py +2 -2
- pygeodesy/geodesicx/_C4_27.py +2 -2
- pygeodesy/geodesicx/_C4_30.py +2 -2
- pygeodesy/geodesicx/__init__.py +2 -2
- pygeodesy/geodesicx/__main__.py +4 -5
- pygeodesy/geodesicx/gx.py +6 -5
- pygeodesy/geodesicx/gxarea.py +2 -2
- pygeodesy/geodesicx/gxbases.py +2 -2
- pygeodesy/geodesicx/gxline.py +16 -12
- pygeodesy/geodsolve.py +1 -1
- pygeodesy/geohash.py +1 -1
- pygeodesy/geoids.py +277 -203
- pygeodesy/hausdorff.py +23 -81
- pygeodesy/heights.py +115 -150
- pygeodesy/internals.py +1 -1
- pygeodesy/interns.py +2 -3
- pygeodesy/iters.py +1 -1
- pygeodesy/karney.py +3 -3
- pygeodesy/ktm.py +16 -15
- pygeodesy/latlonBase.py +323 -409
- pygeodesy/lazily.py +53 -44
- pygeodesy/lcc.py +1 -1
- pygeodesy/ltp.py +46 -50
- pygeodesy/ltpTuples.py +147 -130
- pygeodesy/mgrs.py +1 -1
- pygeodesy/named.py +149 -3
- pygeodesy/namedTuples.py +58 -7
- pygeodesy/nvectorBase.py +122 -105
- pygeodesy/osgr.py +1 -1
- pygeodesy/points.py +1 -1
- pygeodesy/props.py +1 -1
- pygeodesy/resections.py +18 -17
- pygeodesy/rhumb/__init__.py +1 -1
- pygeodesy/rhumb/aux_.py +2 -2
- pygeodesy/rhumb/bases.py +2 -2
- pygeodesy/rhumb/ekx.py +4 -4
- pygeodesy/rhumb/solve.py +1 -1
- pygeodesy/simplify.py +289 -401
- pygeodesy/solveBase.py +1 -1
- pygeodesy/sphericalBase.py +1 -1
- pygeodesy/sphericalNvector.py +5 -5
- pygeodesy/sphericalTrigonometry.py +7 -6
- pygeodesy/streprs.py +10 -5
- pygeodesy/trf.py +1 -1
- pygeodesy/triaxials.py +23 -16
- pygeodesy/units.py +16 -16
- pygeodesy/unitsBase.py +1 -1
- pygeodesy/ups.py +4 -4
- pygeodesy/utily.py +341 -211
- pygeodesy/utm.py +5 -5
- pygeodesy/utmups.py +1 -1
- pygeodesy/utmupsBase.py +1 -1
- pygeodesy/vector2d.py +5 -5
- pygeodesy/vector3d.py +14 -3
- pygeodesy/vector3dBase.py +5 -5
- pygeodesy/webmercator.py +1 -1
- pygeodesy/wgrs.py +1 -1
- PyGeodesy-24.11.11.dist-info/RECORD +0 -118
- {PyGeodesy-24.11.11.dist-info → PyGeodesy-25.1.5.dist-info}/top_level.txt +0 -0
pygeodesy/auxilats/auxily.py
CHANGED
|
@@ -7,7 +7,7 @@ Class L{AuxAngle} transcoded to Python from I{Karney}'s C++ class U{AuxAngle
|
|
|
7
7
|
<https://GeographicLib.SourceForge.io/C++/doc/classGeographicLib_1_1AuxAngle.html>}
|
|
8
8
|
in I{GeographicLib version 2.2+}.
|
|
9
9
|
|
|
10
|
-
Copyright (C) U{Charles Karney<mailto:Karney@Alum.MIT.edu>} (2022-
|
|
10
|
+
Copyright (C) U{Charles Karney<mailto:Karney@Alum.MIT.edu>} (2022-2024) and licensed
|
|
11
11
|
under the MIT/X11 License. For more information, see the U{GeographicLib
|
|
12
12
|
<https://GeographicLib.SourceForge.io>} documentation.
|
|
13
13
|
'''
|
|
@@ -231,7 +231,7 @@ __all__ += _ALL_DOCS(Aux.__class__)
|
|
|
231
231
|
|
|
232
232
|
# **) MIT License
|
|
233
233
|
#
|
|
234
|
-
# Copyright (C) 2023-
|
|
234
|
+
# Copyright (C) 2023-2025 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
235
235
|
#
|
|
236
236
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
237
237
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/azimuthal.py
CHANGED
|
@@ -64,13 +64,13 @@ from pygeodesy.props import deprecated_Property_RO, Property_RO, \
|
|
|
64
64
|
from pygeodesy.streprs import Fmt, _fstrLL0, unstr
|
|
65
65
|
from pygeodesy.units import Azimuth, Easting, Lat_, Lon_, Northing, \
|
|
66
66
|
Scalar, Scalar_
|
|
67
|
-
from pygeodesy.utily import asin1, atan1, atan2b, atan2d,
|
|
68
|
-
sincos2d, sincos2d_
|
|
67
|
+
from pygeodesy.utily import asin1, atan1, atan2, atan2b, atan2d, \
|
|
68
|
+
sincos2, sincos2d, sincos2d_
|
|
69
69
|
|
|
70
|
-
from math import acos,
|
|
70
|
+
from math import acos, degrees, fabs, sin, sqrt
|
|
71
71
|
|
|
72
72
|
__all__ = _ALL_LAZY.azimuthal
|
|
73
|
-
__version__ = '24.11.
|
|
73
|
+
__version__ = '24.11.24'
|
|
74
74
|
|
|
75
75
|
_EPS_K = _EPStol * _0_1 # Karney's eps_ or _EPSmin * _0_1?
|
|
76
76
|
_over_horizon_ = 'over horizon'
|
|
@@ -1119,7 +1119,7 @@ __all__ += _ALL_DOCS(_AzimuthalBase, _AzimuthalGeodesic, _EquidistantBase, _Gnom
|
|
|
1119
1119
|
|
|
1120
1120
|
# **) MIT License
|
|
1121
1121
|
#
|
|
1122
|
-
# Copyright (C) 2016-
|
|
1122
|
+
# Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
1123
1123
|
#
|
|
1124
1124
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
1125
1125
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/basics.py
CHANGED
|
@@ -37,7 +37,7 @@ from math import copysign as _copysign
|
|
|
37
37
|
# import inspect as _inspect # _MODS
|
|
38
38
|
|
|
39
39
|
__all__ = _ALL_LAZY.basics
|
|
40
|
-
__version__ = '24.
|
|
40
|
+
__version__ = '24.12.31'
|
|
41
41
|
|
|
42
42
|
_below_ = 'below'
|
|
43
43
|
_list_tuple_types = (list, tuple)
|
|
@@ -362,25 +362,48 @@ def isint(obj, both=False):
|
|
|
362
362
|
return False
|
|
363
363
|
|
|
364
364
|
|
|
365
|
-
def isiterable(obj):
|
|
365
|
+
def isiterable(obj, strict=False):
|
|
366
366
|
'''Is B{C{obj}}ect C{iterable}?
|
|
367
367
|
|
|
368
368
|
@arg obj: The object (any C{type}).
|
|
369
|
+
@kwarg strict: If C{True}, check class attributes (C{bool}).
|
|
369
370
|
|
|
370
371
|
@return: C{True} if C{iterable}, C{False} otherwise.
|
|
371
372
|
'''
|
|
372
373
|
# <https://PyPI.org/project/isiterable/>
|
|
373
|
-
return hasattr(obj, '__iter__') # map, range, set
|
|
374
|
+
return isiterabletype(obj) if strict else hasattr(obj, '__iter__') # map, range, set
|
|
374
375
|
|
|
375
376
|
|
|
376
|
-
def isiterablen(obj):
|
|
377
|
+
def isiterablen(obj, strict=False):
|
|
377
378
|
'''Is B{C{obj}}ect C{iterable} and has C{len}gth?
|
|
378
379
|
|
|
379
380
|
@arg obj: The object (any C{type}).
|
|
381
|
+
@kwarg strict: If C{True}, check class attributes (C{bool}).
|
|
380
382
|
|
|
381
383
|
@return: C{True} if C{iterable} with C{len}gth, C{False} otherwise.
|
|
382
384
|
'''
|
|
383
|
-
|
|
385
|
+
_has = isiterabletype if strict else hasattr
|
|
386
|
+
return _has(obj, '__len__') and _has(obj, '__getitem__')
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
def isiterabletype(obj, method='__iter__'):
|
|
390
|
+
'''Is B{C{obj}}ect an instance of an C{iterable} class or type?
|
|
391
|
+
|
|
392
|
+
@arg obj: The object (any C{type}).
|
|
393
|
+
@kwarg method: The name of the required method (C{str}).
|
|
394
|
+
|
|
395
|
+
@return: The C{base-class} if C{iterable}, C{None} otherwise.
|
|
396
|
+
'''
|
|
397
|
+
try: # <https://StackOverflow.com/questions/73568964>
|
|
398
|
+
for b in type(obj).__mro__[:-1]: # ignore C{object}
|
|
399
|
+
try:
|
|
400
|
+
if callable(b.__dict__[method]):
|
|
401
|
+
return b
|
|
402
|
+
except (AttributeError, KeyError):
|
|
403
|
+
pass
|
|
404
|
+
except (AttributeError, TypeError):
|
|
405
|
+
pass
|
|
406
|
+
return None
|
|
384
407
|
|
|
385
408
|
|
|
386
409
|
try:
|
|
@@ -558,7 +581,7 @@ def map1(fun1, *xs): # XXX map_
|
|
|
558
581
|
return tuple(map(fun1, xs))
|
|
559
582
|
|
|
560
583
|
|
|
561
|
-
def map2(fun, *xs):
|
|
584
|
+
def map2(fun, *xs, **strict):
|
|
562
585
|
'''Like Python's B{C{map}} but returning a C{tuple} of results.
|
|
563
586
|
|
|
564
587
|
Unlike Python 2's built-in L{map}, Python 3+ L{map} returns a
|
|
@@ -568,10 +591,39 @@ def map2(fun, *xs):
|
|
|
568
591
|
|
|
569
592
|
@arg fun: Function (C{callable}).
|
|
570
593
|
@arg xs: Arguments (C{all positional}).
|
|
594
|
+
@kwarg strict: See U{Python 3.14+ map<https://docs.Python.org/
|
|
595
|
+
3.14/library/functions.html#map>} (C{bool}).
|
|
571
596
|
|
|
572
597
|
@return: Function results (C{tuple}).
|
|
573
598
|
'''
|
|
574
|
-
return tuple(map(fun, *xs))
|
|
599
|
+
return tuple(map(fun, *xs, **strict) if strict else map(fun, *xs))
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
def max2(*xs):
|
|
603
|
+
'''Return 2-tuple C{(max(xs), xs.index(max(xs)))}.
|
|
604
|
+
'''
|
|
605
|
+
return _max2min2(xs, max, max2)
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
def _max2min2(xs, _m, _m2):
|
|
609
|
+
'''(INTERNAL) Helper for C{max2} and C{min2}.
|
|
610
|
+
'''
|
|
611
|
+
if len(xs) == 1:
|
|
612
|
+
x = xs[0]
|
|
613
|
+
if isiterable(x) or isiterablen(x):
|
|
614
|
+
x, i = _m2(*x)
|
|
615
|
+
else:
|
|
616
|
+
i = 0
|
|
617
|
+
else:
|
|
618
|
+
x = _m(xs) # max or min
|
|
619
|
+
i = xs.index(x)
|
|
620
|
+
return x, i
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
def min2(*xs):
|
|
624
|
+
'''Return 2-tuple C{(min(xs), xs.index(min(xs)))}.
|
|
625
|
+
'''
|
|
626
|
+
return _max2min2(xs, min, min2)
|
|
575
627
|
|
|
576
628
|
|
|
577
629
|
def neg(x, neg0=None):
|
|
@@ -934,7 +986,7 @@ _XPACKAGES = _splituple(_getenv(_PYGEODESY(_xpackages), NN).lower()) # test/bas
|
|
|
934
986
|
|
|
935
987
|
# **) MIT License
|
|
936
988
|
#
|
|
937
|
-
# Copyright (C) 2016-
|
|
989
|
+
# Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
938
990
|
#
|
|
939
991
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
940
992
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/booleans.py
CHANGED
|
@@ -1982,7 +1982,7 @@ __all__ += _ALL_DOCS(_BooleanBase, _Clip,
|
|
|
1982
1982
|
|
|
1983
1983
|
# **) MIT License
|
|
1984
1984
|
#
|
|
1985
|
-
# Copyright (C) 2018-
|
|
1985
|
+
# Copyright (C) 2018-2025 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
1986
1986
|
#
|
|
1987
1987
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
1988
1988
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/cartesianBase.py
CHANGED
|
@@ -24,32 +24,32 @@ from pygeodesy.fsums import fsumf_, Fmt
|
|
|
24
24
|
from pygeodesy.interns import _COMMASPACE_, _datum_, _no_, _phi_
|
|
25
25
|
from pygeodesy.interns import _ellipsoidal_, _spherical_ # PYCHOK used!
|
|
26
26
|
from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS
|
|
27
|
-
from pygeodesy.named import _name2__, _Pass
|
|
27
|
+
from pygeodesy.named import _name2__, _NamedLocal, _Pass
|
|
28
28
|
from pygeodesy.namedTuples import LatLon4Tuple, _NamedTupleTo , Vector3Tuple, \
|
|
29
29
|
Vector4Tuple, Bearing2Tuple # PYCHOK .sphericalBase
|
|
30
30
|
# from pygeodesy.nvectorBase import _N_vector # _MODS
|
|
31
31
|
from pygeodesy.props import deprecated_method, Property, Property_RO, property_doc_, \
|
|
32
|
-
property_RO,
|
|
32
|
+
property_RO, _update_all
|
|
33
33
|
# from pygeodesy,resections import cassini, collins5, pierlot, pierlotx, \
|
|
34
34
|
# tienstra7 # _MODS
|
|
35
35
|
# from pygeodesy.streprs import Fmt # from .fsums
|
|
36
36
|
# from pygeodesy.triaxials import Triaxial_ # _MODS
|
|
37
37
|
from pygeodesy.units import Degrees, Height, _heigHt, _isMeter, Meter, Radians
|
|
38
|
-
from pygeodesy.utily import acos1, sincos2d, sincos2_,
|
|
38
|
+
from pygeodesy.utily import acos1, atan2, sincos2d, sincos2_, degrees, radians
|
|
39
39
|
from pygeodesy.vector3d import Vector3d, _xyzhdlln4
|
|
40
40
|
# from pygeodesy.vector3dBase import _xyz3 # _MODS
|
|
41
41
|
# from pygeodesy import ltp # _MODS
|
|
42
42
|
|
|
43
|
-
# from math import
|
|
43
|
+
# from math import degrees, fabs, radians, sqrt # from .fmath, .utily
|
|
44
44
|
|
|
45
45
|
__all__ = _ALL_LAZY.cartesianBase
|
|
46
|
-
__version__ = '24.
|
|
46
|
+
__version__ = '24.12.04'
|
|
47
47
|
|
|
48
48
|
_r_ = 'r'
|
|
49
49
|
_theta_ = 'theta'
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
class CartesianBase(Vector3d):
|
|
52
|
+
class CartesianBase(Vector3d, _NamedLocal):
|
|
53
53
|
'''(INTERNAL) Base class for ellipsoidal and spherical C{Cartesian}.
|
|
54
54
|
'''
|
|
55
55
|
_datum = None # L{Datum}, to be overriden
|
|
@@ -211,12 +211,6 @@ class CartesianBase(Vector3d):
|
|
|
211
211
|
r = Cartesian(*c, **kwds)
|
|
212
212
|
return r.renamed(n) if n else r
|
|
213
213
|
|
|
214
|
-
@property_ROnce
|
|
215
|
-
def Ecef(self):
|
|
216
|
-
'''Get the ECEF I{class} (L{EcefKarney}), I{once}.
|
|
217
|
-
'''
|
|
218
|
-
return _MODS.ecef.EcefKarney
|
|
219
|
-
|
|
220
214
|
@Property_RO
|
|
221
215
|
def _ecef9(self):
|
|
222
216
|
'''(INTERNAL) Helper for L{toEcef}, L{toLocal} and L{toLtp} (L{Ecef9Tuple}).
|
|
@@ -231,14 +225,14 @@ class CartesianBase(Vector3d):
|
|
|
231
225
|
|
|
232
226
|
def hartzell(self, los=False, earth=None):
|
|
233
227
|
'''Compute the intersection of a Line-Of-Sight from this cartesian Point-Of-View
|
|
234
|
-
(pov) and this cartesian's ellipsoid surface.
|
|
228
|
+
(pov) and this cartesian's C{datum} ellipsoid surface.
|
|
235
229
|
|
|
236
230
|
@kwarg los: Line-Of-Sight, I{direction} to the ellipsoid (L{Los}, L{Vector3d}),
|
|
237
231
|
C{True} for the I{normal, plumb} onto the surface or I{False} or
|
|
238
232
|
C{None} to point to the center of the ellipsoid.
|
|
239
233
|
@kwarg earth: The earth model (L{Datum}, L{Ellipsoid}, L{Ellipsoid2}, L{a_f2Tuple}
|
|
240
234
|
or C{scalar} radius in C{meter}), overriding this cartesian's
|
|
241
|
-
|
|
235
|
+
datum.
|
|
242
236
|
|
|
243
237
|
@return: The intersection (C{Cartesian}) with C{.height} set to the distance to
|
|
244
238
|
this C{pov}.
|
|
@@ -284,7 +278,8 @@ class CartesianBase(Vector3d):
|
|
|
284
278
|
return r
|
|
285
279
|
|
|
286
280
|
def height3(self, earth=None, height=None, **Cartesian_and_kwds):
|
|
287
|
-
'''Compute the cartesian at a height above or below this certesian's
|
|
281
|
+
'''Compute the cartesian at a height above or below this certesian's
|
|
282
|
+
C{datum} ellipsoid surface.
|
|
288
283
|
|
|
289
284
|
@kwarg earth: A datum, ellipsoid, triaxial ellipsoid or earth radius,
|
|
290
285
|
I{overriding} this cartesian's datum (L{Datum}, L{Ellipsoid},
|
|
@@ -411,12 +406,6 @@ class CartesianBase(Vector3d):
|
|
|
411
406
|
'''
|
|
412
407
|
return self.toEcef().latlonheightdatum
|
|
413
408
|
|
|
414
|
-
@Property_RO
|
|
415
|
-
def _Ltp(self):
|
|
416
|
-
'''(INTERNAL) Cache for L{toLtp}.
|
|
417
|
-
'''
|
|
418
|
-
return _MODS.ltp.Ltp(self._ecef9, ecef=self.Ecef(self.datum), name=self.name)
|
|
419
|
-
|
|
420
409
|
@Property_RO
|
|
421
410
|
def _N_vector(self):
|
|
422
411
|
'''(INTERNAL) Get the (C{nvectorBase._N_vector_}).
|
|
@@ -696,8 +685,8 @@ class CartesianBase(Vector3d):
|
|
|
696
685
|
def toEcef(self):
|
|
697
686
|
'''Convert this cartesian to I{geodetic} (lat-/longitude) coordinates.
|
|
698
687
|
|
|
699
|
-
@return: An L{Ecef9Tuple}C{(x, y, z, lat, lon, height,
|
|
700
|
-
|
|
688
|
+
@return: An L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)}
|
|
689
|
+
with C{C} and C{M} if available.
|
|
701
690
|
|
|
702
691
|
@raise EcefError: A C{.datum} or an ECEF issue.
|
|
703
692
|
'''
|
|
@@ -706,18 +695,16 @@ class CartesianBase(Vector3d):
|
|
|
706
695
|
def toLatLon(self, datum=None, height=None, LatLon=None, **LatLon_kwds): # see .ecef.Ecef9Tuple.toDatum
|
|
707
696
|
'''Convert this cartesian to a I{geodetic} (lat-/longitude) point.
|
|
708
697
|
|
|
709
|
-
@kwarg datum: Optional datum (L{Datum}, L{Ellipsoid}, L{Ellipsoid2}
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
@kwarg
|
|
714
|
-
|
|
715
|
-
@kwarg LatLon_kwds: Optional, additional B{C{LatLon}} keyword
|
|
716
|
-
arguments, ignored if C{B{LatLon} is None}.
|
|
698
|
+
@kwarg datum: Optional datum (L{Datum}, L{Ellipsoid}, L{Ellipsoid2} or L{a_f2Tuple}).
|
|
699
|
+
@kwarg height: Optional height, overriding the converted height (C{meter}), only if
|
|
700
|
+
C{B{LatLon} is not None}.
|
|
701
|
+
@kwarg LatLon: Optional class to return the geodetic point (C{LatLon}) or C{None}.
|
|
702
|
+
@kwarg LatLon_kwds: Optional, additional B{C{LatLon}} keyword arguments, ignored if
|
|
703
|
+
C{B{LatLon} is None}.
|
|
717
704
|
|
|
718
|
-
@return: The geodetic point (B{C{LatLon}}) or if C{B{LatLon}
|
|
719
|
-
|
|
720
|
-
|
|
705
|
+
@return: The geodetic point (B{C{LatLon}}) or if C{B{LatLon}is None}, an
|
|
706
|
+
L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)} with C{C}
|
|
707
|
+
and C{M} if available.
|
|
721
708
|
|
|
722
709
|
@raise TypeError: Invalid B{C{datum}} or B{C{LatLon_kwds}}.
|
|
723
710
|
'''
|
|
@@ -735,32 +722,6 @@ class CartesianBase(Vector3d):
|
|
|
735
722
|
_xdatum(r.datum, d)
|
|
736
723
|
return r
|
|
737
724
|
|
|
738
|
-
def toLocal(self, Xyz=None, ltp=None, **Xyz_kwds):
|
|
739
|
-
'''Convert this I{geocentric} cartesian to I{local} C{X}, C{Y} and C{Z}.
|
|
740
|
-
|
|
741
|
-
@kwarg Xyz: Optional class to return C{X}, C{Y} and C{Z} (L{XyzLocal},
|
|
742
|
-
L{Enu}, L{Ned}) or C{None}.
|
|
743
|
-
@kwarg ltp: The I{local tangent plane} (LTP) to use, overriding this
|
|
744
|
-
cartesian's LTP (L{Ltp}).
|
|
745
|
-
@kwarg Xyz_kwds: Optional, additional B{C{Xyz}} keyword arguments,
|
|
746
|
-
ignored if C{B{Xyz} is None}.
|
|
747
|
-
|
|
748
|
-
@return: An B{C{Xyz}} instance or a L{Local9Tuple}C{(x, y, z, lat, lon,
|
|
749
|
-
height, ltp, ecef, M)} if C{B{Xyz} is None} (with C{M=None}).
|
|
750
|
-
|
|
751
|
-
@raise TypeError: Invalid B{C{ltp}}.
|
|
752
|
-
'''
|
|
753
|
-
return _MODS.ltp._toLocal(self, ltp, Xyz, Xyz_kwds) # self._ecef9
|
|
754
|
-
|
|
755
|
-
def toLtp(self, Ecef=None, **name):
|
|
756
|
-
'''Return the I{local tangent plane} (LTP) for this cartesian.
|
|
757
|
-
|
|
758
|
-
@kwarg Ecef: Optional ECEF I{class} (L{EcefKarney}, ...
|
|
759
|
-
L{EcefYou}), overriding this cartesian's C{Ecef}.
|
|
760
|
-
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
761
|
-
'''
|
|
762
|
-
return _MODS.ltp._toLtp(self, Ecef, self._ecef9, name) # self._Ltp
|
|
763
|
-
|
|
764
725
|
def toNvector(self, Nvector=None, datum=None, **name_Nvector_kwds):
|
|
765
726
|
'''Convert this cartesian to C{n-vector} components, I{including height}.
|
|
766
727
|
|
|
@@ -1030,7 +991,7 @@ __all__ += _ALL_DOCS(CartesianBase)
|
|
|
1030
991
|
|
|
1031
992
|
# **) MIT License
|
|
1032
993
|
#
|
|
1033
|
-
# Copyright (C) 2016-
|
|
994
|
+
# Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
1034
995
|
#
|
|
1035
996
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
1036
997
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/clipy.py
CHANGED
|
@@ -683,7 +683,7 @@ def clipSH3(points, corners, closed=False, inull=False):
|
|
|
683
683
|
|
|
684
684
|
# **) MIT License
|
|
685
685
|
#
|
|
686
|
-
# Copyright (C) 2018-
|
|
686
|
+
# Copyright (C) 2018-2025 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
687
687
|
#
|
|
688
688
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
689
689
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/constants.py
CHANGED
|
@@ -26,7 +26,7 @@ except ImportError: # Python 2-
|
|
|
26
26
|
_inf, _nan = float(_INF_), float(_NAN_)
|
|
27
27
|
|
|
28
28
|
__all__ = _ALL_LAZY.constants
|
|
29
|
-
__version__ = '24.
|
|
29
|
+
__version__ = '24.12.22'
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
def _copysign_0_0(y):
|
|
@@ -182,6 +182,7 @@ _9_0 = _float( 9) # PYCHOK expected
|
|
|
182
182
|
_10_0 = _float( 10) # PYCHOK expected
|
|
183
183
|
_16_0 = _float( 16) # PYCHOK expected
|
|
184
184
|
_32_0 = _float( 32) # PYCHOK expected
|
|
185
|
+
_45_0 = _float( 45) # PYCHOK expected
|
|
185
186
|
_60_0 = _float( 60) # PYCHOK expected
|
|
186
187
|
_64_0 = _float( 64) # PYCHOK expected
|
|
187
188
|
_90_0 = _float( 90) # PYCHOK expected
|
|
@@ -189,7 +190,6 @@ _100_0 = _float(_100_0) # PYCHOK expected
|
|
|
189
190
|
_180_0 = _float( 180) # PYCHOK expected
|
|
190
191
|
_270_0 = _float( 270) # PYCHOK expected
|
|
191
192
|
_360_0 = _float( 360) # PYCHOK expected
|
|
192
|
-
_400_0 = _float( 400) # PYCHOK expected
|
|
193
193
|
_720_0 = _float( 720) # PYCHOK expected
|
|
194
194
|
_1000_0 = _float(1000) # PYCHOK expected
|
|
195
195
|
_3600_0 = _float(3600) # PYCHOK expected
|
|
@@ -348,8 +348,8 @@ def isfinite(obj):
|
|
|
348
348
|
@arg obj: Value (C{scalar}, C{complex}, an L{Fsum} or
|
|
349
349
|
L{Fsum2Tuple}).
|
|
350
350
|
|
|
351
|
-
@return: C{False} if B{C{obj}} is C{INF}, C{NINF}
|
|
352
|
-
|
|
351
|
+
@return: C{False} if B{C{obj}} is C{INF}, C{NINF} or
|
|
352
|
+
C{NAN}, C{True} otherwise.
|
|
353
353
|
|
|
354
354
|
@raise TypeError: Non-scalar and non-complex B{C{obj}}.
|
|
355
355
|
'''
|
|
@@ -515,7 +515,7 @@ if __name__ == '__main__':
|
|
|
515
515
|
|
|
516
516
|
# **) MIT License
|
|
517
517
|
#
|
|
518
|
-
# Copyright (C) 2016-
|
|
518
|
+
# Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
519
519
|
#
|
|
520
520
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
521
521
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/css.py
CHANGED
|
@@ -642,7 +642,7 @@ def toCss(latlon, cs0=None, height=None, Css=Css, **name):
|
|
|
642
642
|
|
|
643
643
|
# **) MIT License
|
|
644
644
|
#
|
|
645
|
-
# Copyright (C) 2016-
|
|
645
|
+
# Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
646
646
|
#
|
|
647
647
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
648
648
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/datums.py
CHANGED
|
@@ -733,7 +733,7 @@ if __name__ == '__main__':
|
|
|
733
733
|
|
|
734
734
|
# **) MIT License
|
|
735
735
|
#
|
|
736
|
-
# Copyright (C) 2016-
|
|
736
|
+
# Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
737
737
|
#
|
|
738
738
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
739
739
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/deprecated/__init__.py
CHANGED
|
@@ -27,7 +27,7 @@ __all__ = (_ALL_DEPRECATED.deprecated_bases +
|
|
|
27
27
|
_ALL_DEPRECATED.deprecated_classes +
|
|
28
28
|
_ALL_DEPRECATED.deprecated_consterns +
|
|
29
29
|
_ALL_DEPRECATED.deprecated_functions)
|
|
30
|
-
__version__ = '24.
|
|
30
|
+
__version__ = '24.12.31'
|
|
31
31
|
|
|
32
32
|
if _unLazy0:
|
|
33
33
|
from pygeodesy.deprecated import bases, datum, nvector, rhumbBase, \
|
|
@@ -40,7 +40,7 @@ else: # lazily import modules and exported attrs
|
|
|
40
40
|
|
|
41
41
|
# **) MIT License
|
|
42
42
|
#
|
|
43
|
-
# Copyright (C) 2018-
|
|
43
|
+
# Copyright (C) 2018-2025 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
44
44
|
#
|
|
45
45
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
46
46
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/deprecated/bases.py
CHANGED
|
@@ -19,7 +19,7 @@ class LatLonHeightBase(_LatLonBase): # PYCHOK no cover
|
|
|
19
19
|
|
|
20
20
|
# **) MIT License
|
|
21
21
|
#
|
|
22
|
-
# Copyright (C) 2016-
|
|
22
|
+
# Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
23
23
|
#
|
|
24
24
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
25
25
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/deprecated/classes.py
CHANGED
|
@@ -22,7 +22,7 @@ from pygeodesy.trf import TRFXform7Tuple as _TRFXform7Tuple
|
|
|
22
22
|
from pygeodesy.units import Bearing, Int, Lamd, Lat, Lon, Meter, Phid
|
|
23
23
|
|
|
24
24
|
__all__ = _ALL_DEPRECATED.deprecated_classes
|
|
25
|
-
__version__ = '24.
|
|
25
|
+
__version__ = '24.12.31'
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
class _Deprecated_NamedTuple(_NamedTuple):
|
|
@@ -111,6 +111,62 @@ def Fn_rt(root, *xs, **name_RESIDUAL_raiser): # PYCHOK no cover
|
|
|
111
111
|
Froot.__init__(self, root, *xs, **name_RESIDUAL_raiser)
|
|
112
112
|
|
|
113
113
|
|
|
114
|
+
def FrechetCosineAndoyerLambert(point1s, **kwds): # PYCHOK no cover
|
|
115
|
+
'''DEPRECATED on 2024.12.31, use class L{FrechetCosineLaw} with C{B{corr}=1}.'''
|
|
116
|
+
FrechetCosineLaw = _MODS.frechet.FrechetCosineLaw
|
|
117
|
+
|
|
118
|
+
class FrechetCosineAndoyerLambert(FrechetCosineLaw):
|
|
119
|
+
'''DEPRECATED on 2024.12.31, use class L{FrechetCosineLaw} with C{B{corr}=1}.
|
|
120
|
+
'''
|
|
121
|
+
def __init__(self, point1s, **seed_name__radius_wrap):
|
|
122
|
+
deprecated_class(self.__class__)
|
|
123
|
+
FrechetCosineLaw.__init__(self, point1s, corr=1, **seed_name__radius_wrap)
|
|
124
|
+
|
|
125
|
+
return FrechetCosineAndoyerLambert(point1s, **kwds)
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
def FrechetCosineForsytheAndoyerLambert(point1s, **kwds): # PYCHOK no cover
|
|
129
|
+
'''DEPRECATED on 2024.12.31, use class L{FrechetCosineLaw} with C{B{corr}=2}.'''
|
|
130
|
+
FrechetCosineLaw = _MODS.frechet.FrechetCosineLaw
|
|
131
|
+
|
|
132
|
+
class FrechetCosineForsytheAndoyerLambert(FrechetCosineLaw):
|
|
133
|
+
'''DEPRECATED on 2024.12.31, use class L{FrechetCosineLaw} with C{B{corr}=w}.
|
|
134
|
+
'''
|
|
135
|
+
def __init__(self, point1s, **seed_name__radius_wrap):
|
|
136
|
+
deprecated_class(self.__class__)
|
|
137
|
+
FrechetCosineLaw.__init__(self, point1s, corr=2, **seed_name__radius_wrap)
|
|
138
|
+
|
|
139
|
+
return FrechetCosineForsytheAndoyerLambert(point1s, **kwds)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def HausdorffCosineAndoyerLambert(point1s, **kwds): # PYCHOK no cover
|
|
143
|
+
'''DEPRECATED on 2024.12.31, use class L{HausdorffCosineLaw} with C{B{corr}=1}.'''
|
|
144
|
+
HausdorffCosineLaw = _MODS.hausdorff.HausdorffCosineLaw
|
|
145
|
+
|
|
146
|
+
class HausdorffCosineAndoyerLambert(HausdorffCosineLaw):
|
|
147
|
+
'''DEPRECATED on 2024.12.31, use class L{HausdorffCosineLaw} with C{B{corr}=1}.
|
|
148
|
+
'''
|
|
149
|
+
def __init__(self, point1s, **seed_name__radius_wrap):
|
|
150
|
+
deprecated_class(self.__class__)
|
|
151
|
+
HausdorffCosineLaw.__init__(self, point1s, corr=1, **seed_name__radius_wrap)
|
|
152
|
+
|
|
153
|
+
return HausdorffCosineAndoyerLambert(point1s, **kwds)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
def HausdorffCosineForsytheAndoyerLambert(point1s, **kwds): # PYCHOK no cover
|
|
157
|
+
'''DEPRECATED on 2024.12.31, use class L{HausdorffCosineLaw} with C{B{corr}=2}.'''
|
|
158
|
+
HausdorffCosineLaw = _MODS.hausdorff.HausdorffCosineLaw
|
|
159
|
+
|
|
160
|
+
class HausdorffCosineForsytheAndoyerLambert(HausdorffCosineLaw):
|
|
161
|
+
'''DEPRECATED on 2024.12.31, use class L{HausdorffCosineLaw} with C{B{corr}=2}
|
|
162
|
+
'''
|
|
163
|
+
def __init__(self, point1s, **seed_name__radius_wrap):
|
|
164
|
+
deprecated_class(self.__class__)
|
|
165
|
+
HausdorffCosineLaw.__init__(self, point1s, corr=2, **seed_name__radius_wrap)
|
|
166
|
+
|
|
167
|
+
return HausdorffCosineForsytheAndoyerLambert(point1s, **kwds)
|
|
168
|
+
|
|
169
|
+
|
|
114
170
|
def HeightIDW(knots, **kwds): # PYCHOK no cover
|
|
115
171
|
'''DEPRECATED, use class L{HeightIDWeuclidean}.'''
|
|
116
172
|
HeightIDWeuclidean = _MODS.heights.HeightIDWeuclidean
|
|
@@ -151,6 +207,34 @@ def HeightIDW3(knots, **kwds): # PYCHOK no cover
|
|
|
151
207
|
return HeightIDW3(knots, **kwds)
|
|
152
208
|
|
|
153
209
|
|
|
210
|
+
def HeightIDWcosineAndoyerLambert(knots, **kwds): # PYCHOK no cover
|
|
211
|
+
'''DEPRECATED on 2024.12.31, use class L{HeightIDWcosineLaw} with C{B{corr}=1}.'''
|
|
212
|
+
HeightIDWcosineLaw = _MODS.heights.HeightIDWcosineLaw
|
|
213
|
+
|
|
214
|
+
class HeightIDWcosineAndoyerLambert(HeightIDWcosineLaw):
|
|
215
|
+
'''DEPRECATED on 2024.12.31, use class L{HeightIDWcosineLaw} with C{B{corr}=1}.
|
|
216
|
+
'''
|
|
217
|
+
def __init__(self, knots, **beta_name__datum_wrap):
|
|
218
|
+
deprecated_class(self.__class__)
|
|
219
|
+
HeightIDWcosineLaw.__init__(self, knots, corr=1, **beta_name__datum_wrap)
|
|
220
|
+
|
|
221
|
+
return HeightIDWcosineAndoyerLambert(knots, **kwds)
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
def HeightIDWcosineForsytheAndoyerLambert(knots, **kwds): # PYCHOK no cover
|
|
225
|
+
'''DEPRECATED on 2024.12.31, use class L{HeightIDWcosineLaw} with C{B{corr}=2}.'''
|
|
226
|
+
HeightIDWcosineLaw = _MODS.heights.HeightIDWcosineLaw
|
|
227
|
+
|
|
228
|
+
class HeightIDWcosineForsytheAndoyerLambert(HeightIDWcosineLaw):
|
|
229
|
+
'''DEPRECATED on 2024.12.31, use class L{HeightIDWcosineLaw} with C{B{corr}=2}.
|
|
230
|
+
'''
|
|
231
|
+
def __init__(self, knots, **beta_name__datum_wrap):
|
|
232
|
+
deprecated_class(self.__class__)
|
|
233
|
+
HeightIDWcosineLaw.__init__(self, knots, corr=2, **beta_name__datum_wrap)
|
|
234
|
+
|
|
235
|
+
return HeightIDWcosineForsytheAndoyerLambert(knots, **kwds)
|
|
236
|
+
|
|
237
|
+
|
|
154
238
|
class Lam_(Lamd):
|
|
155
239
|
'''DEPRECATED on 2024.06.15, use class L{Lamd}.'''
|
|
156
240
|
def __init__(self, *args, **kwds): # PYCHOK no cover
|
|
@@ -275,7 +359,7 @@ __all__ += _ALL_DOCS(_Deprecated_NamedTuple)
|
|
|
275
359
|
|
|
276
360
|
# **) MIT License
|
|
277
361
|
#
|
|
278
|
-
# Copyright (C) 2018-
|
|
362
|
+
# Copyright (C) 2018-2025 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
279
363
|
#
|
|
280
364
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
281
365
|
# copy of this software and associated documentation files (the "Software"),
|
|
@@ -33,7 +33,7 @@ OK = _Deprecated_Str(OK='OK')
|
|
|
33
33
|
|
|
34
34
|
# **) MIT License
|
|
35
35
|
#
|
|
36
|
-
# Copyright (C) 2018-
|
|
36
|
+
# Copyright (C) 2018-2025 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
37
37
|
#
|
|
38
38
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
39
39
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/deprecated/datum.py
CHANGED
|
@@ -11,15 +11,15 @@ from pygeodesy.ellipsoids import Ellipsoid, Ellipsoids, Curvature2Tuple
|
|
|
11
11
|
from pygeodesy.lazily import _ALL_DEPRECATED, _ALL_OTHER
|
|
12
12
|
|
|
13
13
|
__all__ = _ALL_DEPRECATED.deprecated_datum
|
|
14
|
-
__version__ = '24.
|
|
14
|
+
__version__ = '24.12.31'
|
|
15
15
|
|
|
16
|
-
assert _ALL_OTHER(Curvature2Tuple, Datum, Ellipsoid, Transform) +
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
assert _ALL_OTHER(Curvature2Tuple, Datum, Ellipsoid, Transform) + tuple(_.name for _ in
|
|
17
|
+
(Datums, Ellipsoids, Transforms,
|
|
18
|
+
R_FM, R_KM, R_M, R_MA, R_MB, R_NM, R_SM, R_VM)) == __all__
|
|
19
19
|
|
|
20
20
|
# **) MIT License
|
|
21
21
|
#
|
|
22
|
-
# Copyright (C) 2016-
|
|
22
|
+
# Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
23
23
|
#
|
|
24
24
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
25
25
|
# copy of this software and associated documentation files (the "Software"),
|