*     @SWG\Post(
 *        path="/services/transformcoords",
 *        operationId="TransformCoordinates",
 *        summary="Transforms the given coordinates from the specified source coordinate system to the target coordinate system",
 *        tags={"services"},
 *          @SWG\Parameter(name="from", in="formData", required=true, type="string", description="The Source Coordinate System Code"),
 *          @SWG\Parameter(name="to", in="formData", required=true, type="string", description="The Target Coordinate System Code"),
 *          @SWG\Parameter(name="coords", in="formData", required=true, type="string", description="A comma-delimited list of space-delimited coordinate pairs"),
 *          @SWG\Parameter(name="format", in="formData", required=true, type="string", description="xml or json", enum={"json", "xml"}),
 *        @SWG\Response(response=400, description="You supplied a bad request due to one or more missing or invalid parameters"),
 *        @SWG\Response(response=401, description="Session ID or MapGuide credentials not specified"),
 *        @SWG\Response(response=500, description="An error occurred during the operation")
 *     )
 */
$app->post("/services/transformcoords", function () use($app) {
    $ctrl = new MgCoordinateSystemController($app);
    $ctrl->TransformCoordinates();
});
/**
 *     @SWG\Post(
 *        path="/services/createmap.{type}",
 *        operationId="CreateRuntimeMap",
 *        summary="Creates a new Runtime Map (MgMap) instance from the specified map definition and returns detailed information about its layer/group structure if requested",
 *        tags={"services"},
 *          @SWG\Parameter(name="session", in="formData", required=false, type="string", description="Your MapGuide Session ID. If none specified you must pass the basic http authentication challenge"),
 *          @SWG\Parameter(name="mapdefinition", in="formData", required=true, type="string", description="The Map Definition ID to create a new runtime map from"),
 *          @SWG\Parameter(name="targetmapname", in="formData", required=false, type="string", description="The target map name to associate the Runtime Map by. By default, the name is generated from the Map Definition ID"),
 *          @SWG\Parameter(name="requestedfeatures", in="formData", required=false, type="integer", description="A bitmask of the information about the Runtime Map that you would like returned. 1=Layer/Group structure, 2=icons, 4=Feature Source Information"),
 *          @SWG\Parameter(name="iconformat", in="formData", required=false, type="string", description="The desired icon image format if icons are requested", enum={"PNG","JPG","PNG8","GIF"}),
 *          @SWG\Parameter(name="iconwidth", in="formData", required=false, type="integer", description="The desired width of generated icons if icons are requested"),
 *          @SWG\Parameter(name="iconheight", in="formData", required=false, type="integer", description="The desired height of generated icons if icons are requested"),
/**
 *     @SWG\Get(
 *        path="/coordsys/epsg/{epsg}/wkt.{type}",
 *        operationId="ConvertEpsgToCsCode",
 *        summary="Converts the given EPSG code to WKT",
 *        tags={"coordsys"},
 *          @SWG\Parameter(name="session", in="query", required=false, type="string", description="Your MapGuide Session ID"),
 *          @SWG\Parameter(name="epsg", in="path", required=true, type="string", description="The EPSG code"),
 *          @SWG\Parameter(name="type", in="path", required=true, type="string", description="xml or json", enum={"json", "xml"}),
 *        @SWG\Response(response=400, description="You supplied a bad request due to one or more missing or invalid parameters"),
 *        @SWG\Response(response=401, description="Session ID or MapGuide credentials not specified"),
 *        @SWG\Response(response=500, description="An error occurred during the operation")
 *     )
 */
$app->get("/coordsys/epsg/:epsg/wkt.:format", function ($epsg, $format) use($app) {
    $ctrl = new MgCoordinateSystemController($app);
    $ctrl->ConvertEpsgToWkt($epsg, $format);
});
/*
$app->post("/coordsys/tomentor/:wkt+", function($wkt) use ($app) {
    $wktStr = implode("/", $wkt);
    echo $wktStr;
    die;
    $ctrl = new MgCoordinateSystemController($app);
    $ctrl->ConvertWktToCsCode($wktStr);
});
$app->post("/coordsys/toepsg/:wkt+", function($wkt) use ($app) {
    $wktStr = implode("/", $wkt);
    echo $wktStr;
    die;
    $ctrl = new MgCoordinateSystemController($app);