from mapscript import mapObj,layerObj wkt = '''ProjectedCoordinateSystem:RiceCountyMNProjection:Lambert_Conformal_ConicFalse_Easting:500000.00000000False_Northing:100000.00000000Central_Meridian:-93.13333333Standard_Parallel_1:44.30000000Standard_Parallel_2:44.66666667Latitude_Of_Origin:44.19472210LinearUnit:Foot_USGeographicCoordinateSystem:RiceCountyDatumDatum:Name:RiceCountyDatumAngularUnit:Degree[0.017453292519943299]''' m = mapObj('') m.setWKTProjection(wkt) lyr = layerObj(m) lyr.setWKTProjection(wkt)