[R-sig-Geo] +no_uoff flag in proj4string, epsg 26931

Gregovich, Dave P (DFG) dave.gregovich at alaska.gov
Tue Aug 12 18:48:59 CEST 2014


Hello,
I would like to project data in epsg 26931 (NAD83 Alaska State Plane zone 1 meters), variant A. There are two variants to the projection:
--variant A has its origin on the central line of the projection, on the 'aposphere equator'
--variant B has its origin at the projection center
Apparently, variant A should be specifiable via a '+no_uoff' flag
I can specify variant B in this way...

#create a test point, and convert to SPDF
xy<-c(775082.505359,720337.454359)
test.pt<-data.frame(x=xy[1],y=xy[2],id=1)
coordinates(test.pt)<-c('x','y')

#Assign projection
proj4string(test.pt)<- '+proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=323.1301023611111
                                                                +k=0.9999 +x_0=5000000 +y_0=-5000000 +gamma=323.1301023611111 +datum=NAD83
                                                                +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0'

# the above is the same as using proj4string(test.pt)<-'+init = epsg:26931',
# it is also identical to the proj4string obtained for a shapefile created in ArcGIS and imported to R
# using 'readOGR', that is originally projected in the 26931

#But when I try to specify variant A, the +no_uoff flag is ignored...
proj4string(test.pt)<- '+proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=323.1301023611111 +no_uoff
                                                                +k=0.9999 +x_0=5000000 +y_0=-5000000 +gamma=323.1301023611111 +datum=NAD83
                                                                +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0'
proj4string(test.pt)
#just to verify, I also try using spTransform...
test.pt<-spTransform(test.pt,CRS('+proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=323.1301023611111 +no_uoff
                                                                                    +k=0.9999 +x_0=5000000 +y_0=-5000000 +gamma=323.1301023611111 +datum=NAD83
                                                                                    +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0'))
proj4string(test.pt)

I would report to the os.geo list on this, but I only know the R syntax to this point, so it is difficult to formulate an example for them.

Thanks kindly for any advice you can lend, I appreciate it.

Dave.

________________________________________________
sessionInfo()
R version 3.0.3 (2014-03-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252 LC_NUMERIC=C                           LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] rgdal_0.8-16  raster_2.2-31 sp_1.0-15

loaded via a namespace (and not attached):
[1] grid_3.0.3      lattice_0.20-27 tools_3.0.3

> library(rgdal)
rgdal: version: 0.8-16, (SVN revision 498)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.11.0, released 2014/04/16
Path to GDAL shared files: C:/Program Files/R/R-3.0.3/library/rgdal/gdal
GDAL does not use iconv for recoding strings.
Loaded PROJ.4 runtime: Rel. 4.8.0, 6 March 2012, [PJ_VERSION: 480]
Path to PROJ.4 shared files: C:/Program Files/R/R-3.0.3/library/rgdal/proj
_____________________________________________

__________________________________
Dave Gregovich
Research Analyst
Alaska Department of Fish and Game
Wildlife Conservation Division
Douglas, AK 99821
(907) 465-4291
dave.gregovich at alaska.gov
__________________________________


	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list