getAvailableEllipsoidNames() public static method

Returns the list of available ellipsoids sorted by alphabetical order.
public static getAvailableEllipsoidNames ( ) : string
return string The list of available ellipsoids comma separated.
    protected function configure()
    {
        $availableEllipsoids = Ellipsoid::getAvailableEllipsoidNames();
        $this->setName('vertex:final-bearing')->setDescription('Compute the final bearing in degrees between 2 coordinates')->addArgument('origin', InputArgument::REQUIRED, 'The origin "Lat,Long" coordinate')->addArgument('destination', InputArgument::REQUIRED, 'The destination "Lat,Long" coordinate')->addOption('ellipsoid', null, InputOption::VALUE_REQUIRED, 'If set, the name of the ellipsoid to use', Ellipsoid::WGS84)->setHelp(<<<EOT
<info>Available ellipsoids</info>: {$availableEllipsoids}

<info>Example with GRS_1980 ellipsoid</info>:

    %command.full_name% "40° 26.7717, -79° 56.93172" "30°16′57″N 029°48′32″W" <comment>--ellipsoid=GRS_1980</comment>
EOT
);
    }
Beispiel #2
0
    protected function configure()
    {
        $availableEllipsoids = Ellipsoid::getAvailableEllipsoidNames();
        $this->setName('distance:haversine')->setDescription('Compute the distance between 2 coordinates using the haversine algorithm, in meters by default')->addArgument('origin', InputArgument::REQUIRED, 'The origin "Lat,Long" coordinate')->addArgument('destination', InputArgument::REQUIRED, 'The destination "Lat,Long" coordinate')->addOption('km', null, InputOption::VALUE_NONE, 'If set, the distance will be shown in kilometers')->addOption('mi', null, InputOption::VALUE_NONE, 'If set, the distance will be shown in miles')->addOption('ft', null, InputOption::VALUE_NONE, 'If set, the distance will be shown in feet')->addOption('ellipsoid', null, InputOption::VALUE_REQUIRED, 'If set, the name of the ellipsoid to use', Ellipsoid::WGS84)->setHelp(<<<EOT
<info>Available ellipsoids</info>: {$availableEllipsoids}

<info>Example with WGS66 ellipsoid and output in feet</info>:

    %command.full_name% "40° 26.7717, -79° 56.93172" "30°16′57″N 029°48′32″W" <comment>--ellipsoid=WGS66 --ft</comment>
EOT
);
    }
Beispiel #3
0
    protected function configure()
    {
        $availableEllipsoids = Ellipsoid::getAvailableEllipsoidNames();
        $this->setName('convert:utm')->setDescription('Convert decimal degrees coordinates in the Universal Transverse Mercator projection')->addArgument('coordinate', InputArgument::REQUIRED, 'The "Lat,Long" coordinate')->addOption('ellipsoid', null, InputOption::VALUE_REQUIRED, 'If set, the name of the ellipsoid to use', Ellipsoid::WGS84)->setHelp(<<<EOT
<info>Available ellipsoids</info>: {$availableEllipsoids}

<info>Example with CLARKE_1866 ellipsoid</info>:

    %command.full_name% "40.446195, -79.948862" <comment>--ellipsoid=CLARKE_1866</comment>
EOT
);
    }
    protected function configure()
    {
        $availableEllipsoids = Ellipsoid::getAvailableEllipsoidNames();
        $this->setName('vertex:destination')->setDescription('Compute the destination coordinate with given bearing in degrees and a distance in meters')->addArgument('origin', InputArgument::REQUIRED, 'The origin "Lat,Long" coordinate')->addArgument('bearing', InputArgument::REQUIRED, 'The initial bearing in degrees')->addArgument('distance', InputArgument::REQUIRED, 'The distance from the origin coordinate in meters')->addOption('ellipsoid', null, InputOption::VALUE_REQUIRED, 'If set, the name of the ellipsoid to use', Ellipsoid::WGS84)->setHelp(<<<EOT
<info>Available ellipsoids</info>: {$availableEllipsoids}

<info>Example with SOUTH_AMERICAN_1969 ellipsoid, 25 degrees and 10000 meters</info>:

    %command.full_name% "40° 26.7717, -79° 56.93172" 25 10000 <comment>--ellipsoid=SOUTH_AMERICAN_1969</comment>
EOT
);
    }
    protected function configure()
    {
        $availableEllipsoids = Ellipsoid::getAvailableEllipsoidNames();
        $this->setName('point:initial-cardinal')->setDescription('Compute the initial cardinal point (direction) between 2 coordinates')->addArgument('origin', InputArgument::REQUIRED, 'The origin "Lat,Long" coordinate')->addArgument('destination', InputArgument::REQUIRED, 'The destination "Lat,Long" coordinate')->addOption('ellipsoid', null, InputOption::VALUE_REQUIRED, 'If set, the name of the ellipsoid to use', Ellipsoid::WGS84)->setHelp(<<<EOT
<info>Available ellipsoids</info>: {$availableEllipsoids}

<info>Example with INTERNATIONAL ellipsoid</info>:

    %command.full_name% "40° 26.7717, -79° 56.93172" "30°16′57″N 029°48′32″W" <comment>--ellipsoid=INTERNATIONAL</comment>
EOT
);
    }
Beispiel #6
0
    protected function configure()
    {
        $availableEllipsoids = Ellipsoid::getAvailableEllipsoidNames();
        $this->setName('convert:dms')->setDescription('Convert and format decimal degrees coordinates to degrees minutes seconds coordinate')->addArgument('coordinate', InputArgument::REQUIRED, 'The "Lat,Long" coordinate')->addOption('format', null, InputOption::VALUE_REQUIRED, 'If set, the format of the converted degrees minutes seconds coordinate', ConvertInterface::DEFAULT_DMS_FORMAT)->addOption('ellipsoid', null, InputOption::VALUE_REQUIRED, 'If set, the name of the ellipsoid to use', Ellipsoid::WGS84)->setHelp(<<<EOT
<info>Available ellipsoids</info>: {$availableEllipsoids}

<info>Example with an output format</info>:

    %command.full_name% "40.446195, -79.948862" <comment>--format="%P%D:%M:%S, %p%d:%m:%s"</comment>

<info>Example with BESSEL_1841 ellipsoid</info>:

    %command.full_name% "40.446195, -79.948862" <comment>--ellipsoid=BESSEL_1841</comment>
EOT
);
    }