class_docstr: A geodetic point with latitude, longitude, and altitude.
  
  Latitude and longitude are floating point values in degrees.
  Altitude is a floating point value in kilometers. The reference level
  is never considered and is thus application dependent, so be consistent!
  The default for all values is 0.
  
  Points can be created in a number of ways...
  
  With latitude, longitude, and altitude::
  
      >>> p1 = Point(41.5, -81, 0)
      >>> p2 = Point(latitude=41.5, longitude=-81)
  
  With a sequence of 2 to 3 values (latitude, longitude, altitude)::
  
      >>> p1 = Point([41.5, -81, 0])
      >>> p2 = Point((41.5, -81))
  
  Copy another `Point` instance::
  
      >>> p2 = Point(p1)
      >>> p2 == p1
      True
      >>> p2 is p1
      False
  
  Give a string containing at least latitude and longitude::
  
      >>> p = Point('41.5,-81.0')
      >>> p = Point('+41.5 -81.0')
      >>> p = Point('41.5 N -81.0 W')
      >>> p = Point('-41.5 S, 81.0 E, 2.5km')
      >>> p = Point('23 26m 22s N 23 27m 30s E 21.0mi')
      >>> p = Point('''3 26' 22" N 23 27' 30" E''')
  
  Point values can be accessed by name or by index::
  
      >>> p = Point(41.5, -81.0, 0)
      >>> p.latitude == p[0]
      True
      >>> p.longitude == p[1]
      True
      >>> p.altitude == p[2]
      True
  
  When unpacking (or iterating), a ``(latitude, longitude, altitude)`` tuple is
  returned::
  
      >>> latitude, longitude, altitude = p
  
  Textual representations::
  
      >>> p = Point(41.5, -81.0, 12.3)
      >>> str(p)  # same as `p.format()`
      '41 30m 0s N, 81 0m 0s W, 12.3km'
      >>> p.format_unicode()
      '41° 30′ 0″ N, 81° 0′ 0″ W, 12.3km'
      >>> repr(p)
      'Point(41.5, -81.0, 12.3)'
      >>> repr(tuple(p))
      '(41.5, -81.0, 12.3)'
docstr: Create and return a ``Point`` instance from a string containing
  latitude and longitude, and optionally, altitude.
  
  Latitude and longitude must be in degrees and may be in decimal form
  or indicate arcminutes and arcseconds (labeled with Unicode prime and
  double prime, ASCII quote and double quote or 'm' and 's'). The degree
  symbol is optional and may be included after the decimal places (in
  decimal form) and before the arcminutes and arcseconds otherwise.
  Coordinates given from south and west (indicated by S and W suffixes)
  will be converted to north and east by switching their signs. If no
  (or partial) cardinal directions are given, north and east are the
  assumed directions. Latitude and longitude must be separated by at
  least whitespace, a comma, or a semicolon (each with optional
  surrounding whitespace).
  
  Altitude, if supplied, must be a decimal number with given units.
  The following unit abbrevations (case-insensitive) are supported:
  
      - ``km`` (kilometers)
      - ``m`` (meters)
      - ``mi`` (miles)
      - ``ft`` (feet)
      - ``nm``, ``nmi`` (nautical miles)
  
  Some example strings that will work include:
  
      - ``41.5;-81.0``
      - ``41.5,-81.0``
      - ``41.5 -81.0``
      - ``41.5 N -81.0 W``
      - ``-41.5 S;81.0 E``
      - ``23 26m 22s N 23 27m 30s E``
      - ``23 26' 22" N 23 27' 30" E``
      - ``UT: N 39°20' 0'' / W 74°35' 0''``
docstr_tok: ["Create","and","return","a","``","Point","``","instance","from","a","string","containing","latitude","and","longitude",",","and","optionally",",","altitude",".","Latitude","and","longitude","must","be","in","degrees","and","may","be","in","decimal","form","or","indicate","arcminutes","and","arcseconds","(","labeled","with","Unicode","prime","and","double","prime",",","ASCII","quote","and","double","quote","or","'m","'","and","'s","'",")",".","The","degree","symbol","is","optional","and","may","be","included","after","the","decimal","places","(","in","decimal","form",")","and","before","the","arcminutes","and","arcseconds","otherwise",".","Coordinates","given","from","south","and","west","(","indicated","by","S","and","W","suffixes",")","will","be","converted","to","north","and","east","by","switching","their","signs",".","If","no","(","or","partial",")","cardinal","directions","are","given",",","north","and","east","are","the","assumed","directions",".","Latitude","and","longitude","must","be","separated","by","at","least","whitespace",",","a","comma",",","or","a","semicolon","(","each","with","optional","surrounding","whitespace",")",".","Altitude",",","if","supplied",",","must","be","a","decimal","number","with","given","units",".","The","following","unit","abbrevations","(","case-insensitive",")","are","supported",":","-","``","km","``","(","kilometers",")","-","``","m","``","(","meters",")","-","``","mi","``","(","miles",")","-","``","ft","``","(","feet",")","-","``","nm","``",",","``","nmi","``","(","nautical","miles",")","Some","example","strings","that","will","work","include",":","-","``","41.5",";","-81.0","``","-","``","41.5",",","-81.0","``","-","``","41.5","-81.0","``","-","``","41.5","N","-81.0","W","``","-","``","-41.5","S",";","81.0","E","``","-","``","23","26m","22s","N","23","27m","30s","E","``","-","``","23","26","'","22","''","N","23","27","'","30","''","E","``","-","``","UT",":","N","39\u00b020","'","0","''","\/","W","74\u00b035","'","0","''","``"]
code: def from_string(cls, string):
      """
      Create and return a ``Point`` instance from a string containing
      latitude and longitude, and optionally, altitude.
  
      Latitude and longitude must be in degrees and may be in decimal form
      or indicate arcminutes and arcseconds (labeled with Unicode prime and
      double prime, ASCII quote and double quote or 'm' and 's'). The degree
      symbol is optional and may be included after the decimal places (in
      decimal form) and before the arcminutes and arcseconds otherwise.
      Coordinates given from south and west (indicated by S and W suffixes)
      will be converted to north and east by switching their signs. If no
      (or partial) cardinal directions are given, north and east are the
      assumed directions. Latitude and longitude must be separated by at
      least whitespace, a comma, or a semicolon (each with optional
      surrounding whitespace).
  
      Altitude, if supplied, must be a decimal number with given units.
      The following unit abbrevations (case-insensitive) are supported:
  
          - ``km`` (kilometers)
          - ``m`` (meters)
          - ``mi`` (miles)
          - ``ft`` (feet)
          - ``nm``, ``nmi`` (nautical miles)
  
      Some example strings that will work include:
  
          - ``41.5;-81.0``
          - ``41.5,-81.0``
          - ``41.5 -81.0``
          - ``41.5 N -81.0 W``
          - ``-41.5 S;81.0 E``
          - ``23 26m 22s N 23 27m 30s E``
          - ``23 26' 22" N 23 27' 30" E``
          - ``UT: N 39°20' 0'' / W 74°35' 0''``
  
      """
      match = re.match(cls.POINT_PATTERN, re.sub(r"''", r'"', string))
      if match:
          latitude_direction = None
          if match.group("latitude_direction_front"):
              latitude_direction = match.group(
                  "latitude_direction_front"
              )
          elif match.group("latitude_direction_back"):
              latitude_direction = match.group(
                  "latitude_direction_back"
              )
  
          longitude_direction = None
          if match.group("longitude_direction_front"):
              longitude_direction = match.group(
                  "longitude_direction_front"
              )
          elif match.group("longitude_direction_back"):
              longitude_direction = match.group(
                  "longitude_direction_back"
              )
          latitude = cls.parse_degrees(
              match.group("latitude_degrees") or 0.0,
              match.group("latitude_arcminutes") or 0.0,
              match.group("latitude_arcseconds") or 0.0,
              latitude_direction,
          )
          longitude = cls.parse_degrees(
              match.group("longitude_degrees") or 0.0,
              match.group("longitude_arcminutes") or 0.0,
              match.group("longitude_arcseconds") or 0.0,
              longitude_direction,
          )
          altitude = cls.parse_altitude(
              match.group("altitude_distance"),
              match.group("altitude_units"),
          )
          return cls(latitude, longitude, altitude)
      else:
          raise ValueError(
              "Failed to create Point instance from string: unknown format."
          )
  
imports: import collections.abc
  import re
  import warnings
  from itertools import islice
  from math import fmod, isfinite
  from geopy import units, util
  from geopy.format import DEGREE, DOUBLE_PRIME, PRIME, format_degrees, format_distance
label_desc: Use image node_id 17 for calling the Point obj's underlying member method code with example usage: obj.from_string(cls, string) and returns: cls