> On Jan 31, 2017, at 7:46 AM, 
> niels.vonfestenberg-packisch....@rohde-schwarz.com wrote:
> 
> Hi all, 
> I would like to transform local cartesian coordinates into longitude and 
> latitude. According to all the documentation I could find, I tried doing this 
> (in C++, specifying a center for the orthographic projection at 56 N 15 E): 
> 
> projPJ cSourceProjection = pj_init_plus("+proj=ortho +ellps=WGS84 
> +datum=WGS84 +lat_0=56 +lon_0=15 +no_defs"); 
> projPJ cTargetProjection = pj_init_plus("+proj=longlat +ellps=WGS84 
> +datum=WGS84 +no_defs"); 
> projXY pt; 
> // 1 
> pt.u = 0; pt.v = 0; 
> pj_transform( cSourceProjection, cTargetProjection, 1, 0, &pt.u, &pt.v, 0 ); 
> printf ("Result 1: %2.6f %2.6f", pt.u, pt.v); 
> // 2 
> pt.u = 0; pt.v = 111120; 
> pj_transform( cSourceProjection, cTargetProjection, 1, 0, &pt.u, &pt.v, 0 ); 
> printf ("Result 2: %2.6f %2.6f", pt.u, pt.v); 
> 
> --> Delivers : 
> Result 1: 0.26180 0.97738 


Your Result 1 is 15.0° and 56.0° respectively, in radians. 

Chris

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to