Coordinate System API: ConvertEpsgCodeToWkt
";
$factory = new MgCoordinateSystemFactory();
$code = $_GET['CODE'];
$epsgcode = 0 + $code; // Convert to an integer
$wkt = $factory->ConvertEpsgCodeToWkt($epsgcode);
$status = "Pass";
}
catch ( MgException $e )
{
$errorMsg = $e->GetExceptionMessage();
$status = "Fail";
}
catch ( Exception $e )
{
$errorMsg = $e->getMessage();
$status = "Fail";
}
echo "EPSG Code:
";
echo htmlentities(strip_tags($code), ENT_NOQUOTES);
echo "
";
echo "OGC WKT:
";
echo "$wkt
";
echo "Status:
";
echo "$status
";
if($errorMsg != "")
{
echo "Error:
";
echo $errorMsg;
}
?>