Re: [R-sig-Geo] different projection transformation R and gdal commandline

2016-02-16 Thread Dominik Schneider
Oh, silly me. doing plot(spTransform(box,CRS(pstring))) and it's obvious what's happening. The projection rotates the polygon such that for the corners y1,x1 and y2,x2 y1 != y2. But ymin(spTransform(box,CRS(pstring))) still gives you the smallest coordinate regardless of which corner it is.

Re: [R-sig-Geo] different projection transformation R and gdal commandline

2016-02-16 Thread Dominik Schneider
Hi Chris, Thanks for confirming this. I'm not surprised that gdalUtils gives the same answer as the gdal utilities - my understanding is that gdalUtils is basically the equivalent to calling the commandline utilities via system(). I'm hoping that someone can shed light on spTransform since I use

Re: [R-sig-Geo] different projection transformation R and gdal commandline

2016-02-15 Thread Chris Reudenbach
Hi Dominik, If you use the gdalUtils package there is no significant difference in the results using CLI or R: library(gdalUtils) gdaltransform(s_srs="+proj=longlat +datum=WGS84", t_srs="+proj=lcc +lat_1=28 +lat_2=50 +lat_0=39.70001220694445 +lon_0=-98 +x_0=0 +y_0=0 +ellps=sphere

Re: [R-sig-Geo] different projection transformation R and gdal commandline

2016-02-15 Thread Dominik Schneider
Sorry, forgot to add the details. rgdal and gdal 1.11.3 were installed from kyngchaos.com > sessionInfo() R version 3.2.3 (2015-12-10) Platform: x86_64-apple-darwin14.5.0 (64-bit) Running under: OS X 10.11.3 (El Capitan) locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

[R-sig-Geo] different projection transformation R and gdal commandline

2016-02-15 Thread Dominik Schneider
Hi, I'm struggling to use a custom projection. I am seeing differences with someone using python proj4 bindings and when I compared my R results with my commandline results I got even more confused. the coordinate transformation is different for the two different methods. could someone explain to