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 me which one is wrong and why? Thanks R: e=c(-112.25,-104.125,33,43.75) box=as(extent(e),'SpatialPolygons') proj4string(box)='+proj=longlat +datum=WGS84' pstring='+proj=lcc +lat_1=28 +lat_2=50 +lat_0=39.70001220694445 +lon_0=-98 +x_0=0 +y_0=0 +ellps=sphere +a=6370000 +b=6370000 +units=m +no_defs' xmin(spTransform(box,CRS(pstring))) ## [1] -1306471 ymin(spTransform(box,CRS(pstring))) ## [1] -713442.3 commandline: iMac:~ $ 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 +a=6370000 +b=6370000 +units=m +no_defs" -112.25 33. -1306675.75472246 -629522.472322824 0 [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo