I have a problem which many ArcGIS, QGIS and R users from Czech Republic and Slovakia may encounter. In ArcGIS, I am working EPSG: 5514, Projected Coordinate System, defined as:
S-JTSK_Krovak_East_North WKID: 5514 Authority: EPSG Projection: Krovak False_Easting: 0.0 False_Northing: 0.0 Pseudo_Standard_Parallel_1: 78.5 Scale_Factor: 0.9999 Azimuth: 30.28813975277778 Longitude_Of_Center: 24.83333333333333 Latitude_Of_Center: 49.5 X_Scale: -1.0 Y_Scale: 1.0 XY_Plane_Rotation: 90.0 Linear Unit: Meter (1.0) Geographic Coordinate System: GCS_S_JTSK Angular Unit: Degree (0.0174532925199433) Prime Meridian: Greenwich (0.0) Datum: D_S_JTSK Spheroid: Bessel_1841 Semimajor Axis: 6377397.155 Semiminor Axis: 6356078.962818189 Inverse Flattening: 299.1528128
When I load my file in R, my
"+proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"
I've got the same information when I export my files from R using
writeRaster() function from
raster package. However, when I want to open my data modified in R again in ArcGIS, my ArcGIS crashes, and if I am lucky, I've got a warning message :
Warning, inconsistent extent!
This error message is returned if the data has an incorrect projection definition.
Specifically, the data is in a projected coordinate system with units of feet, meters or other linear units, but the projection has been defined with a Geographic Coordinate System (GCS) that has units in decimal degrees.
Thus, obviously the projection of my data has changed, but when and how ???
How can I correctly transfer data between R and ArcGIS using Krovak EPSG 5514? I've also found, that this one PCS is also listed as EPSG: 102067 under ArcGIS, however, R doesn't recognize this code.
sample data: http://ulozto.sk/xNHrBv2D/r3-zip
as an output I was using several formats. I was able to opet Gtiff once, .img neidther one time, .grd seems not to be directly recognized by ArcGIS.
writeRaster(aaa, filename="r3.img", format="HFA", overwrite=TRUE) # export data writeRaster(aaa, filename="r3.tif", format="GTiff", overwrite=TRUE) # export data writeRaster(aaa, filename="r3", overwrite=TRUE) # creates a .grd