Oihana PHP Arango

geoMultiPolygon.php

Table of Contents

Functions

geoMultiPolygon()  : string
Build a GeoJSON MultiPolygon geometry.

Functions

geoMultiPolygon()

Build a GeoJSON MultiPolygon geometry.

geoMultiPolygon(array<string|int, mixed>|string $polygons) : string

This helper wraps the ArangoDB AQL function GEO_MULTIPOLYGON(polygons) which constructs a valid GeoJSON MultiPolygon from an array of polygons. Each polygon is itself an array of linear rings of [longitude, latitude] pairs, following the GeoJSON longitude-first convention.

Example AQL usage:

GEO_MULTIPOLYGON([ [ [ [0,0],[1,0],[1,1],[0,0] ] ] ])
Parameters
$polygons : array<string|int, mixed>|string

An array of polygons, or an AQL expression.

Tags
example
use function oihana\arango\db\functions\geo\geoMultiPolygon;

$expr = geoMultiPolygon( 'doc.areas' );
// Produces: 'GEO_MULTIPOLYGON(doc.areas)'
see
https://docs.arangodb.com/stable/aql/functions/geo/#geo_multipolygon
since
1.0.0
author

Marc Alcaraz

Return values
string

The formatted AQL expression.

On this page

Search results