Novidades na versão 1.4.
Definição
MongoDB\Model\IndexInfo::is2dSphere()Retorne se o índice é um índice dsphere2 .
function is2dSphere(): boolean
Return Values
Um booleano que indica se o índice é um índice 2dsphere.
Exemplos
$collection = (new MongoDB\Client)->getCollection('test', 'places');
$collection->createIndex(['pos' => '2dsphere']);
foreach ($collection->listIndexes() as $index) { if ($index->is2dSphere()) { printf("%s has 2dsphereIndexVersion: %d\n", $index->getName(), $index['2dsphereIndexVersion']); }}A saída seria então semelhante a:
pos_2dsphere has 2dsphereIndexVersion: 3Veja também
2Referência de índices dsphere no manual do MongoDB