Coverage for pygeodesy/deprecated/__init__.py : 100%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# -*- coding: utf-8 -*-
including deprecated modules C{pygeodesy.bases}, C{pygeodesy.datum} and C{pygeodesy,nvector}, previously inside the C{pygeodesy} package.
Use either C{from pygeodesy import bases} or C{from pygeodesy.deprecated import bases}. Likewise for C{datum} and C{nvector}. ''' HeightIDWeuclidean as _HeightIDWeuclidean, \ HeightIDWhaversine as _HeightIDWhaversine _northing_, _scalar_, _UNDERSCORE_, _zone_ pygeodesy.deprecated.datum as datum, \ pygeodesy.deprecated.nvector as nvector # PYCHOK unused
# DEPRECATED classes, for export only '''DEPRECATED, use class L{HeightIDWeuclidean}. '''
'''DEPRECATED, use class L{HeightIDWequirectangular}. '''
'''DEPRECATED, use class L{HeightIDWhaversine}. '''
'''DEPRECATED, use class L{TRFError}. '''
'''OBSOLETE, expect a L{UtmUps5Tuple} from method C{Mgrs.toUtm(utm=None)}.
4-Tuple C{(zone, hemipole, easting, northing)} as C{str}, C{str}, C{meter} and C{meter}. '''
'''DEPRECATED, use function L{anstr}. '''
'''DEPRECATED, use function L{areaOf}. '''
'''DEPRECATED, use function L{boundsOf}.
@return: 2-Tuple C{(latlonSW, latlonNE)} as B{C{LatLon}} or 4-Tuple C{(latS, lonW, latN, lonE)} if B{C{LatLon}} is C{None}. '''
def clipDMS(deg, limit): # PYCHOK no cover '''DEPRECATED, use function L{clipDegrees}. ''' from pygeodesy.dms import clipDegrees return clipDegrees(deg, limit)
'''DEPRECATED, use function L{clips}. '''
'''DEPRECATED, use function L{epsg.decode2}.
@return: 2-Tuple C{(zone, hemipole)} '''
'''DEPRECATED, use function L{epsg.encode}.
@return: C{EPSG} code (C{int}). '''
def enStr2(easting, northing, prec, *extras): # PYCHOK no cover '''DEPRECATED, use function L{enstr2}. ''' from pygeodesy.streprs import enstr2 return enstr2(easting, northing, prec, *extras)
'''DEPRECATED, use function C{equirectangular_}.
@return: 3-Tuple C{(distance2, delta_lat, delta_lon)}. '''
def false2f(value, name='value', false=True, Error=ValueError): # PYCHOK no cover '''DEPRECATED, use function L{falsed2f}. ''' return falsed2f(falsed=false, Error=Error, **{name: value})
def falsed2f(falsed=True, Error=ValueError, **name_value): # PYCHOK no cover '''DEPRECATED, use class L{Easting} or L{Northing}.
Convert a falsed east-/northing to non-negative C{float}.
@kwarg falsed: Value includes false origin (C{bool}). @kwarg Error: Optional, overriding error (C{Exception}). @kwarg name_value: One B{C{name=value}} pair.
@return: The value (C{float}).
@raise Error: Invalid or negative B{C{name=value}}. ''' t = NN if len(name_value) == 1: try: for f in name_value.values(): f = float(f) if falsed and f < 0: break return f t = 'falsed, negative' except (TypeError, ValueError) as x: t = str(x) from pygeodesy.errors import _InvalidError raise _InvalidError(Error=Error, txt=t, **name_value)
'''DEPRECATED, use function L{fstr}. '''
def fStrzs(floatstr): # PYCHOK no cover '''DEPRECATED, use function L{fstrzs}. ''' from pygeodesy.streprs import fstrzs return fstrzs(floatstr)
'''DEPRECATED, use function L{hypot_}. '''
def inStr(inst, *args, **kwds): # PYCHOK no cover '''DEPRECATED, use function L{instr}. ''' from pygeodesy.streprs import instr return instr(inst, *args, **kwds)
'''DEPRECATED, use function L{isenclosedBy}. '''
'''DEPRECATED, use function L{nearestOn5}.
@return: 3-Tuple C{(lat, lon, distance)} '''
'''DEPRECATED, use function L{nearestOn5}.
@return: 4-Tuple C{(lat, lon, distance, angle)} '''
'''DEPRECATED, use function L{parseUTM5}.
@return: The UTM coordinate (B{L{Utm}}) or 4-tuple C{(zone, hemisphere, easting, northing)} if B{C{Utm}} is C{None}. '''
'''DEPRECATED, use function L{perimeterOf}. '''
'''DEPRECATED, use function L{points2}. '''
def scalar(value, low=EPS, high=1.0, name=_scalar_, Error=ValueError): # PYCHOK no cover '''DEPRECATED, use class L{Number_} or L{Scalar_}.
@arg value: The value (C{scalar}). @kwarg low: Optional lower bound (C{scalar}). @kwarg high: Optional upper bound (C{scalar}). @kwarg name: Optional name of value (C{str}). @kwarg Error: Exception to raise (C{ValueError}).
@return: New value (C{float} or C{int} for C{int} B{C{low}}).
@raise Error: Invalid B{C{value}}. ''' from pygeodesy.basics import isint from pygeodesy.units import Number_, Scalar_ C_ = Number_ if isint(low) else Scalar_ return C_(value, name=name, Error=Error, low=low, high=high)
'''DEPRECATED, use function L{simplifyRW}. '''
'''DEPRECATED, use function L{toUtm8}.
@return: The UTM coordinate (B{C{Utm}}) or a 6-tuple C{(zone, easting, northing, band, convergence, scale)} if B{C{Utm}} is C{None} or B{C{cmoff}} is C{False}. ''' # no hemisphere/pole and datum
'''DEPRECATED, use function L{unstr}. '''
'''DEPRECATED, use function L{utmZoneBand5}.
@return: 2-Tuple C{(zone, band)}. '''
# **) MIT License # # Copyright (C) 2018-2020 -- mrJean1 at Gmail -- All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. |