Hi Friends,
I am trying o project certain points in wgs84 (wkid: 102100) to a custom projection (wkt shown below) in a WAB widget (running on jsapi 3.27 ) . FYI, i cannot use a wkid as its a custom projection with modified parameters.
PROJCS["NAD_1983_UTM_Zone_11N",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",1640416.666666667],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-117.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Foot_US",0.3048006096012192]]
My Sample Code:
// input SPRS
var inputSRS=new SpatialReference({
wkid:102100
});
// Output SPRS
var outputSrs = new SpatialReference({"wkt": 'PPROJCS["NAD_1983_UTM_Zone_11N",' +
'GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",' +
'SPHEROID["GRS_1980",6378137.0,298.257222101]],' +
'PRIMEM["Greenwich",0.0],' +
'UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],' +
'PARAMETER["False_Easting",1640416.666666667],PARAMETER["False_Northing",0.0],' +
'PARAMETER["Central_Meridian",-117.0],' +
'PARAMETER["Scale_Factor",0.9996],'+
'PARAMETER["Latitude_Of_Origin",0.0],'+
'UNIT["Foot_US",0.3048006096012192"'
});
// Projection logic
projection.load().then(lang.hitch(this,function()
{
var projectedPoints = projection.project(inputPoints, this.outputSrs);
projectedPoints.forEach(function(point) {
console.log(point.x, point.y);
});
}));
I getting the below error msg when the code tried to project the input points. Just wondering of jsapi 3.27 version has a known bug with SPRS that are defined using wkt instead of wkid.
Your help is appreciated.
A