Get possible addresses using latitude/longitude

@param  float $latitude
@param  float $longitude
@return array
@throws Exception
775108
public function getAddresses(float $latitude, float $longitude): ?array
    {
        // init results
        $addresses = [];

        // define result
        $addressSuggestions = $this->doCall(array(
            'latlng' => $latitude . ',' . $longitude,
            'sensor' => 'false'
        ));

        // loop addresses
        foreach ($addressSuggestions as $key => $addressSuggestion) {
            $addresses[$key] = Address::createFromGoogleResult($addressSuggestion);
        }

        return $addresses;
    }
272728
public static function pointDMS(array $bounds = null)
    {
        list($lat, $lng) = static::point($bounds);

        return sprintf('%s %s', self::floatToDMS($lat), self::floatToDMS($lng));
    }
286727
def get_lonlats(self):
        """"""
        longitudes = self.get_sds_variable('Longitude')
        latitudes = self.get_sds_variable('Latitude')
        return longitudes, latitudes
870457
public function get($ip)
    {
        $data = $this->getRaw($ip);

        if (empty($data) || (array_get($data, 'status') === 'fail')) {
            return $this->getDefault();
        }

        return [
            'city' => array_get($data, 'city'),
            'country' => array_get($data, 'country'),
            'countryCode' => array_get($data, 'countryCode'),
            'latitude' => (float) number_format(array_get($data, 'lat'), 5),
            'longitude' => (float) number_format(array_get($data, 'lon'), 5),
            'region' => array_get($data, 'regionName'),
            'regionCode' => array_get($data, 'region'),
            'timezone' => array_get($data, 'timezone'),
            'postalCode' => array_get($data, 'zip'),
        ];
    }
1210529
public function fromArray(array $data = [])
    {
        if (isset($data['providerName'])) {
            $this->providerName = $data['providerName'];
        }
        if (isset($data['query'])) {
            $this->query = $data['query'];
        }
        if (isset($data['exception'])) {
            $this->exception = $data['exception'];
        }

        //GeoCoder Address::createFromArray expects longitude/latitude keys
        $data['address']['longitude'] = $data['address']['coordinates']['longitude'] ?? null;
        $data['address']['latitude'] = $data['address']['coordinates']['latitude'] ?? null;

        // Shortcut to create the address and set it in this class
        $this->setAddress(Address::createFromArray($data['address']));
    }
1076033
public function get($latitude = null, $longitude = null, $time = null)
    {
        $this->guardAgainstEmptyArgument($latitude, 'latitude');
        $this->guardAgainstEmptyArgument($longitude, 'longitude');

        $url = $this->getUrl($latitude, $longitude, $time);

        $forecast = $this->getClient()->get($url);

        return $forecast->json();
    }
63034
static public function getYandexCoordinatesByAdress($addressString)
    {
        if ($data = static::getYandexFirstFutureMemeber($addressString))
        {
            if ($coordinates = ArrayHelper::getValue($data, 'GeoObject.Point.pos'))
            {
                if ($coordinates)
                {
                    $data = explode(" ", $coordinates);
                    return [$data[1], $data[0]];
                }
            }
        }

        return [];
    }
973291
public void add(final double latitude, final double longitude) {
        ensureCapacity(size + 1);
        this.longitude[size] = longitude;
        this.latitude[size] = latitude;
        ++size;
    }
195973
public static function addressFromLatLng ($lat, $lng)
	{
		/** @var Settings $settings */
		$settings = SimpleMap::getInstance()->getSettings();
		$token    =
			static::getToken($settings->geoToken, $settings->geoService);

		switch ($settings->geoService)
		{
			case GeoEnum::Here:
				return static::_addressFromLatLng_Here(
					$token,
					$lat, $lng
				);
			case GeoEnum::GoogleMaps:
				return static::_addressFromLatLng_Google(
					$token,
					$lat, $lng
				);
			case GeoEnum::Mapbox:
				return static::_addressFromLatLng_Mapbox(
					$token,
					$lat, $lng
				);
			case GeoEnum::Nominatim:
				return static::_addressFromLatLng_Nominatim(
					$lat, $lng
				);
			default:
				throw new Exception(
					'Unknown geo-coding service: ' . $settings->geoService
				);
		}
	}
755386
public function marker($latitude, $longitude, array $options = [])
	{
		$parameters = [
			'latitude' => $latitude,
			'longitude' => $longitude,
		];

		$parameters = array_replace_recursive(
			$this->options,
			$parameters,
			$options
		);

		$this->markers[] = new Marker($parameters);
	}
940074
public function coords()
    {
        $lat = $this->lat();
        $lng = $this->lng();

        if ($lat && $lng) {
            return [ 'lat' => $lat, 'lng' => $lng ];
        } else {
            return null;
        }
    }
290770
public function getCoordinatesByObject(AddressInterface $address) : CoordinatesInterface
    {
        $url = $this->addressQuery($address->getFormattedAddress());
        $json = $this->fetchUrl($url);

        // convert google data to coordinates
        $coordinates = CoordinatesBuild::create($json->results[0]);

        return $coordinates;
    }
662616
public static function convertLocationCoordinates(Location $location)
    {
        $coordinates = $location->getCoordinates()->getCoordinates();
        $coordinate = doubleval($coordinates[1]) . '%' . doubleval($coordinates[0]);
        $coordinate = strtr($coordinate, [
            '%'=>',',
            ','=>'.'
        ]);
        return $coordinate;
    }
398294
public static function getDistance($latitudeA, $longitudeA, $latitudeB, $longitudeB)
    {
        $earth_radius = 6371;

        $dLat = deg2rad($latitudeB - $latitudeA);
        $dLon = deg2rad($longitudeB - $longitudeA);

        $a = sin($dLat / 2) * sin($dLat / 2) + cos(deg2rad($latitudeA)) * cos(deg2rad($latitudeB)) * sin($dLon / 2) * sin($dLon / 2);
        $c = 2 * asin(sqrt($a));
        $d = $earth_radius * $c;

        return $d;
    }
1342879
public boolean getForecast(String LATITUDE, String LONGITUDE) {


		try {
			String reply = httpGET( urlBuilder(LATITUDE, LONGITUDE) );
			if(reply == null)
				return false;
			this.forecast = Json.parse(reply).asObject();
			//this.forecast = JsonObject.readFrom(reply);
		} catch (NullPointerException e) {
			System.err.println("Unable to connect to the API: "+e.getMessage());
			return false;
		}

		return getForecast(this.forecast);


	}
493690
public static final Geoshape point(final float latitude, final float longitude) {
        Preconditions.checkArgument(isValidCoordinate(latitude,longitude),"Invalid coordinate provided");
        return new Geoshape(new float[][]{ new float[]{latitude}, new float[]{longitude}});
    }
467417
public Double getValue(double latitude, double longitude) {
		CoverageDataRequest request = new CoverageDataRequest(latitude,
				longitude);
		CoverageDataResults values = getValues(request, 1, 1);
		Double value = null;
		if (values != null) {
			value = values.getValues()[0][0];
		}
		return value;
	}