Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am using the LDOPE mask_sds tool to mask a MODIS image based on the quality flags for MOD13A3 NDVI. The full command that I am using is:

mask_sds -of=mask.hdf -fill=-3000 -sds='1km monthly NDVI' -mask="MOD13A3.A2000336.h25v02.005.2007112105435.hdf,'1km monthly VI Quality',0-1==00,AND,*,*,11-13==001" -meta MOD13A3.A2000336.h25v02.005.2007112105435.hdf

I am getting the following error:

Cannot find the SDS '1km monthly VI Quality' 
Ignoring input masking option MOD13A3.A2000336.h25v02.005.2007112105435.hdf,'1km monthly VI Quality',0-1==00,AND
Cannot open the input HDF file *
Cannot open the HDF file *
Ignoring input masking option *,*,11-13==001
usage: 
    mask_sds -help [filename] 

    mask_sds -of=<output filename> -sds=<SDSname1>[,<SDSname2>[,...]]> 
    [-fill=<mask fill value>] -mask=<mask1>[,AND|OR,<mask2>[,...]] [-meta]
    filename 
       where maskn=< filename>,<SDSname>,<bit_numbers operator bit_values>

It looks like it can not find the SDS (science data set) for the quality flag. I have tried several variations of '1km monthly VI Quality', including without quotes. This website lists SDS's for each MODIS product (I am using MOD13A3).

I would appreciate any suggestions.

Thank you, Kevin

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

There were two issues with my mask_sds command call:

  1. You need to use double quotes for the first SDS, and no quotes for the second SDS (originally, I had used single quotes for each).
  2. 1km should be 1 km (with a space between 1 and km

    mask_sds -of=mask.hdf -fill=-3000 -sds="1 km monthly NDVI" -mask="MOD13A3.A2000336.h25v02.005.2007112105435.hdf,1 km monthly VI Quality,0-1==00,AND,,,11-13==001" -meta MOD13A3.A2000336.h25v02.005.2007112105435.hdf

Unfortunately there is very little documentation on the LDOPE tool (other than the user manual, which didn't help much with my problem). I had to resort to trial and error until (after I invested way too much time) I found the right syntax.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.