Copied!

Coordinate class

CloneableInstantiable
Methods
public __construct( $coordinates, ?League\Geotools\Coordinate\Ellipsoid $ellipsoid = NULL)
 

Set the latitude and the longitude of the coordinates into an selected ellipsoid.

  • param \Location|array|string $coordinates The coordinates.
  • param \Ellipsoid $ellipsoid The selected ellipsoid (WGS84 by default).
  • throws \InvalidArgumentException
public getEllipsoid()
 
    public getLatitude()
     
      public getLongitude()
       
        public getPrecision()
         
        • return int
        public isEqual(League\Geotools\Coordinate\Coordinate $coordinate)
         

        Returns a boolean determining coordinates equality

        • param \Coordinate $coordinate
        • return bool
        public jsonSerialize()
         
        • attribute ReturnTypeWillChange
        public normalizeLatitude( $latitude)
         
          public normalizeLongitude( $longitude)
           
            public setFromString( $coordinates)
             

            Creates a valid and acceptable geographic coordinates.

            • param string $coordinates
            • throws \InvalidArgumentException
            public setLatitude( $latitude)
             
              public setLongitude( $longitude)
               
                public setPrecision( $precision)
                 
                • param int $precision
                • return $this
                Properties
                protected $ellipsoid = NULL
                 

                The selected ellipsoid.

                • var \Ellipsoid
                protected $latitude = NULL
                 

                The latitude of the coordinate.

                • var float
                protected $longitude = NULL
                 

                The longitude of the coordinate.

                • var float
                Properties
                private $precision = 8
                 

                The precision to use to compare big numbers

                • var int
                Methods
                private toDecimalDegrees( $coordinates)
                 

                Converts a valid and acceptable geographic coordinates to decimal degrees coordinate.

                • param string $coordinates A valid and acceptable geographic coordinates.
                • return array An array of coordinate in decimal degree.
                • throws \InvalidArgumentException
                • see http://en.wikipedia.org/wiki/Geographic_coordinate_conversion
                © 2024 Bruce Wells
                Search Namespaces \ Classes
                Configuration