Skip to main content
deleted 27 characters in body; edited title; edited body
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

Seeking R equivalent of arcmapArcMap Mirror features

I have datasets in .nc format. I imported them in rR as rasters but they appear as lateral inversions (see image below).

NC data as raster

I tried changing the orientation and inversion with the codes below but none worked as the results are all laterally inverted. In arcmapArcMap, one can use the mirror feature tool to correct the lateral inversion. 

Is there a way to do something similar to mirroring features in r. Thank you.R?

f <- list.files(path=".", 
                   pattern='nc$', full.names=TRUE) 
s <- stack(raster(f)) 


P <- t(flip(s, direction='x'))


P2 <- t(flip(s, direction='y'))

The resulting images for P and P2 are shown below.

Image for P

Image for P2

Thank you.

R equivalent of arcmap Mirror features

I have datasets in .nc format. I imported them in r as rasters but they appear as lateral inversions (see image below).

NC data as raster

I tried changing the orientation and inversion with the codes below but none worked as the results are all laterally inverted. In arcmap, one can use the mirror feature tool to correct the lateral inversion. Is there a way to do something similar to mirroring features in r. Thank you.

f <- list.files(path=".", 
                   pattern='nc$', full.names=TRUE) 
s <- stack(raster(f)) 


P <- t(flip(s, direction='x'))


P2 <- t(flip(s, direction='y'))

The resulting images for P and P2 are shown below.

Image for P

Image for P2

Thank you.

Seeking R equivalent of ArcMap Mirror features

I have datasets in .nc format. I imported them in R as rasters but they appear as lateral inversions (see image below).

NC data as raster

I tried changing the orientation and inversion with the codes below but none worked as the results are all laterally inverted. In ArcMap, one can use the mirror feature tool to correct the lateral inversion. 

Is there a way to do something similar to mirroring features in R?

f <- list.files(path=".", 
                   pattern='nc$', full.names=TRUE) 
s <- stack(raster(f)) 


P <- t(flip(s, direction='x'))


P2 <- t(flip(s, direction='y'))

The resulting images for P and P2 are shown below.

Image for P

Image for P2

Source Link

R equivalent of arcmap Mirror features

I have datasets in .nc format. I imported them in r as rasters but they appear as lateral inversions (see image below).

NC data as raster

I tried changing the orientation and inversion with the codes below but none worked as the results are all laterally inverted. In arcmap, one can use the mirror feature tool to correct the lateral inversion. Is there a way to do something similar to mirroring features in r. Thank you.

f <- list.files(path=".", 
                   pattern='nc$', full.names=TRUE) 
s <- stack(raster(f)) 


P <- t(flip(s, direction='x'))


P2 <- t(flip(s, direction='y'))

The resulting images for P and P2 are shown below.

Image for P

Image for P2

Thank you.