Skip to content
Prev 5766 / 29559 Next

read NITF save as geotif

Hi Arien,
 
Well, i hoped it was straight forward - but it seems it is not.
 
So if i use your code (which is almost like mine ....) i get this:
 
b1 <- readGDAL("myfile")
writeGDAL(b1, "test.tif")
Error: gridded(dataset) is not TRUE
 
If i try points2grid command i get:
 
 points2grid(b1, tolerance = 0.5)
cellcentre.offset -9.362957e+01 3.008636e+01
cellsize           8.535574e-09 7.422092e-09
cells.dim          9.000000e+06 9.000000e+06
Warning messages:
1: In points2grid(b1, tolerance = 0.5, round = 3, fuzz.tol = 4) :
  grid topology may be corrupt in dimwnsion 1
2: In points2grid(b1, tolerance = 0.5, round = 3, fuzz.tol = 4) :
  grid topology may be corrupt in dimwnsion 2

class(b1)
 
[1] "SpatialPointsDataFrame"
attr(,"package")
[1] "sp"

b1[1,]
          coordinates band1
1 (-93.6295, 30.1529)   286
 
summary(b1)

Object of class SpatialPointsDataFrame
Coordinates:
        min       max
x -93.62957 -93.55275
y  30.08636  30.15316
Is projected: FALSE 
proj4string :
[+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +towgs84=0,0,0]
Number of points: 9000000
Data attributes:
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  165.0   207.0   219.0   224.5   233.0  1449.0 

I am not sure if this is enough info, but if not i am sure i can post the file. Also i have to say that i read only part of the file - it is too bit it seems for my system to read all of it. I work on a 64 bit Windows machine with a 32 bit R 2.8.1 patch ( i know is kind of old but should not matter, i have all the packages just updated anyway).
 
Thanks,
 
Monica
----------------------------------------
_________________________________________________________________
Hotmail? has a new way to see what's up with your friends.

orial_WhatsNew1_052009