public function geoQuery($georel, $geoJson, array $modifiers = [], array $options = [], &$request = null) {
        if (is_string($geoJson)) {
            $geoJson = json_decode($geoJson);
        } elseif (is_array($geoJson)) {
            $geoJson = (object) $geoJson;
        }

        if ($geoJson == null) {
            throw new \Exception('$geoJson Param should be a valid GeoJson object or string');
        }

        array_unshift($modifiers, $georel);

        $options["georel"] = implode(";", $modifiers);
        $options["geometry"] = strtolower($geoJson->type);
        $options["coords"] = $this->coordsQueryString($geoJson->coordinates);

        return $this->getContext($options, $request);
    }
public function geoQuery($georel, $geoJson, array $modifiers = [], array $options = [], &$request = null) {
        if (is_string($geoJson)) {
            $geoJson = json_decode($geoJson);
        } elseif (is_array($geoJson)) {
            $geoJson = (object) $geoJson;
        }

        if ($geoJson == null) {
            throw new \Exception('$geoJson Param should be a valid GeoJson object or string');
        }

        array_unshift($modifiers, $georel);

        $options["georel"] = implode(";", $modifiers);
        $options["geometry"] = strtolower($geoJson->type);
        $options["coords"] = $this->coordsQueryString($geoJson->coordinates);

        return $this->getContext($options, $request);
    }
public function geoQuery ( $ georel , $ geoJson , array $ modifiers = [ ] , array $ options = [ ] , & $ request = null ) { if ( is_string ( $ geoJson ) ) { $ geoJson = json_decode ( $ geoJson ) ; } elseif ( is_array ( $ geoJson ) ) { $ geoJson = ( object ) $ geoJson ; } if ( $ geoJson == null ) { throw new \ Exception ( '$geoJson Param should be a valid GeoJson object or string' ) ; } array_unshift ( $ modifiers , $ georel ) ; $ options [ "georel" ] = implode ( ";" , $ modifiers ) ; $ options [ "geometry" ] = strtolower ( $ geoJson -> type ) ; $ options [ "coords" ] = $ this -> coordsQueryString ( $ geoJson -> coordinates ) ; return $ this -> getContext ( $ options , $ request ) ; }
Geo Spatial handler method
@param string $georel Spatial relationship (a predicate) between matching entities and a referenced shape ($geoJson)
@param string|array|stdClass $geoJson http://geojson.org/geojson-spec.html
@param array $modifiers
@param array $options
@param mixed $request
@return \Orion\Context\Context
@throws \Exception
Geo Spatial handler method