Coordinate System API: EnumerateCategories

"; // We have to use a factory because there is no direct access to the MgCoordinateSystem constructor $ll84 = "GEOGCS [ \"Longitude / Latitude (WGS 84)\", DATUM [\"WGS 84\", SPHEROID [\"WGS 84\", 6378137.000000, 298.257224]], PRIMEM [ \"Greenwich\", 0.000000 ], UNIT [\"Decimal Degree\", 0.01745329251994330]]"; $factory = new MgCoordinateSystemFactory(); $mgcoordinatesystem = $factory->Create($ll84); // Get the list of categories $categories = $mgcoordinatesystem->EnumerateCategories(); $count = $categories->GetCount(); echo "Coordinate System Categories: $count
"; for($i=1;$i<=$count;$i++) { $category = $categories->GetItem($i-1); echo "$i: $category
"; } echo "
"; $status = "Pass"; } catch ( MgException $e ) { $errorMsg = $e->GetMessage(); $status = "Fail"; } catch ( Exception $e ) { $errorMsg = $e->getMessage(); $status = "Fail"; } echo "Status:
"; echo "$status

"; if($errorMsg != "") { echo "Error:
"; echo $errorMsg; } ?>