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