Comments (8)
Hi,
Thanks for signaling this. We'll have a look ASAP. Did you try by any chance also to use MODIStsp
functionality for extraction of bit-fields information, by selecting also the "MODLAND QA bits" output as shown below ?
Do you have the same results ?
Lorenzo
from modistsp.
from modistsp.
Are all the QA layers always at 0, or just the one derived from conversion of bits 31-32 ?
from modistsp.
from modistsp.
ok, thanks for the info.
I'll be able to have a look tomorrow
from modistsp.
Hi Rob,
could you please save your processing options (corresponding to the image for which you sent me the RData) from the GUI and send me the JSON file ?
Lorenzo
from modistsp.
Hi Rob,
I probably managed to replicate your issue, and it seems it could be related to a possible bug in gdalbuildvrt
(not the R implementation but the gdal command itself) in "reading" 32 bit unsigned files.
To verify this, could you try to run the following simple script on your machine ? You just have to modify the path to the MOD09A1.A2005361.h21v09.006.2015112231520.hdf image and set the path to a "temporary" folder on your machine.
library(gdalUtils)
library(raster)
# set the path to the MOD09A1.A2005361.h21v09.006.2015112231520.hdf image on your machine
file_in <- "/home/lb/Temp/buttami/MOD09A1.A2005361.h21v09.006.2015112231520.hdf"
# set this path to a "temporary" folder on your machine
temp_folder <- "/home/lb/Temp/buttami"
MOD_proj_str <- "+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371007.181 +b=6371007.181 +units=m +no_defs"
outfile_vrt <- file.path(temp_folder, "testraster_vrt.vrt")
outrep_file_1 <- file.path(temp_folder, "testraster_vrt_trans.tif")
outrep_file_2 <- file.path(temp_folder, "testraster_norm_trans.tif")
nodata_in <- "4294967295"
nodata_out <- "4294967295"
out_format <- "GTiff"
# build the vrt file
gdalbuildvrt(file_in, outfile_vrt, sd = 8,srcnodata = nodata_in,
vrtnodata = nodata_out, verbose = T, r = "nearest",
overwrite = T)
# convert the vrt to tif
test_translate_vrt <- gdal_translate(outfile_vrt,
outrep_file_1,
a_srs = MOD_proj_str, of = out_format,
ot = "Uint32", a_nodata = nodata_in,
overwrite = TRUE, output_Raster = T, r = "nearest",
stats = TRUE, strict = TRUE, verbose = T)
# build the tif file directly from the hdf
hdf_in <- get_subdatasets(file_in)
test_translate_norm <- gdal_translate(hdf_in[8],
outrep_file_2, r = "nearest",
a_srs = MOD_proj_str, of = out_format,
ot = "Uint32", a_nodata = nodata_out,
overwrite = TRUE, output_Raster = T,
stats = TRUE, strict = TRUE)
# compare the two files - they should be identical
diff = (getValues(test_translate_vrt) - getValues(test_translate_norm))
summary(diff)
testraster_norm_trans
Min. :-63.000
1st Qu.: 0.000
Median : 0.000
Mean : -1.411
3rd Qu.: 0.000
Max. : 55.000
Since in MODIStsp
we create temporary gdal vrt
files to allow fast mosaicing of different tiles without creating temporary "physical" files, this problem affects also the final saved tif
files .If this problem is confirmed we will have to change strategy. The strange thing is that it seems to affect only a subset of the possible values, as you can see from this histogram of the differences:
from modistsp.
This should be fixed by Commit b05e405
Feel free to re-open if you still encounter problems.
(Currently, the fix is only in the github
version. will be included in CRAN on MODIStsp v1.3.3
)
from modistsp.
Related Issues (20)
- MODIStsp GUI issues HOT 6
- KNDVI (expression) - MODIStsp HOT 3
- bounding box does not work HOT 1
- Error in .local(.Object, ...) when trying to use MODIStsp_extract HOT 2
- M*D17A3H server change HOT 2
- Update products HOT 5
- Problems of processing MCD19A1 and MCD19A3 HOT 1
- Timeout HOT 1
- Timeout MODIS server error when downloading HOT 4
- Problem with GUI in GitHub version 2.0.6.9000 of MODIStsp HOT 2
- Connection refused HOT 2
- How to download the NDVI-MODIS product of the version 6.1 using the package MODIStsp v.2.0.6 HOT 2
- The package doesn't work on the new Spectral Indexes I added HOT 1
- [SOLVED] MODIStsp package is showing Username and password invalid even when the same credentials are working for NASA earth data search website HOT 21
- Missing dependency for pkgdown HOT 2
- Fix image location for pkgdown HOT 7
- Call for maintainer HOT 9
- Issues related to product version update in #238 HOT 23
- Spatial packages update HOT 2
- Error: http server seems to be down! Please try again later. Aborting! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modistsp.