[FWTools] MODIS processing
Ned Horning
nedh at lightlink.com
Wed Jan 4 10:59:19 EST 2006
Frank,
Thanks for the quick reply. I pasted the output from gdalinfo below. I don't
see any evidence that GCPs are used from the gdalinfo output. That said, I
have a feeling that OpenEV is using GCPs since I'm not sure how else
georeferencing could work.
I tried to run gdalinfo on one of the subdatasets (# 6) but there seems to
be a problem with my input file syntax. This is one version I tried:
gdalinfo
HDF4_EOS:EOS_SWATH:"C:\AMNH\ModisCloudImages\MOD35_L2.A2000184.0755.005.2005
182222430.hdf":mod35:Cloud_Mask
I will try gdalwarp as you suggest but first I need figure out how to
specify the first band of subdataset 6 as input into gdalwarp. Can you help
with that?
All the best,
Ned
--
C:\Program Files\FWTools1.0.0a7>gdalinfo
C:\AMNH\ModisCloudImages\MOD35_L2.A2000184.0755.005.2005182222430.hdf
Driver: HDF4/Hierarchical Data Format Release 4
Size is 512, 512
Coordinate System is `'
Metadata:
HDFEOSVersion=HDFEOS_V2.9
Number_of_Instrument_Scans=2030
Maximum_Number_of_1km_Frames=1354
history=$Id: get_spec_info.f,v 1.1.1.4 2005/06/21 15:48:27 sshen Exp $
title=MODIS Level 2 Cloud Mask
RCS_Id= $Id: thresholds.dat.Terra,v 1.1.2.5 2004/10/25 18:09:00 raf Exp $
UW_DESTRIPE_LWIR=$Id: hdf_destripe_new.f90,v 1.3 2005/01/18 19:31:07 sshen
Exp
$
UW_DESTRIPE_CONFIG=# Terra MODIS destriping configuration $Id:
destripe_config
_terra.dat,v 1.3 2004/05/19 20:26:21 gumley Exp $
LOCALGRANULEID=MOD35_L2.A2000184.0755.005.2005182222430.hdf
PRODUCTIONDATETIME=2005-07-01T22:24:31.000Z
DAYNIGHTFLAG=Day
REPROCESSINGACTUAL=processed once
LOCALVERSIONID=005
REPROCESSINGPLANNED=further update is anticipated
SCIENCEQUALITYFLAG=Not Investigated
AUTOMATICQUALITYFLAGEXPLANATION=Passed if useable, Failed if not useable
AUTOMATICQUALITYFLAG=Passed
SCIENCEQUALITYFLAGEXPLANATION=See
http://modis-atmos.gsfc.nasa.gov/validation.
html for more details on MODIS Atmosphere data quality.
QAPERCENTMISSINGDATA=0
PARAMETERNAME=Cloud_Mask
EQUATORCROSSINGDATE=2000-07-02
EQUATORCROSSINGTIME=07:50:49.132943
ORBITNUMBER=2868
EQUATORCROSSINGLONGITUDE=43.4917547878849
VERSIONID=5
SHORTNAME=MOD35_L2
INPUTPOINTER=UR:10:DsShESDTUR:UR:15:DsShSciServerUR:13:[GSF:DSSDSRV]:21:SC:M
OD
03.005:53353044,
UR:10:DsShESDTUR:UR:15:DsShSciServerUR:13:[GSF:DSSDSRV]:24:SC:M
OD021KM.005:53358280,
UR:10:DsShESDTUR:UR:15:DsShSciServerUR:13:[GSF:DSSDSRV]:24
:SC:MOD02QKM.005:53358283, goge1_2_img.v1.coeff.v5.2.0.LUTv0,
ecosystem.img.v1.c
oeff.v5.2.0.LUTv0, thresholds.dat.terra.v13.coeff,
UR:10:DsShESDTUR:UR:15:DsShSc
iServerUR:13:[GSF:DSSDSRV]:22:SC:GDAS_0ZF.001:578172,
UR:10:DsShESDTUR:UR:15:DsS
hSciServerUR:13:[GSF:DSSDSRV]:23:SC:REYNSST.002:20959521,
UR:10:DsShESDTUR:UR:15
:DsShSciServerUR:13:[GSF:DSSDSRV]:21:SC:SEA_ICE.001:579376,
UR:10:DsShESDTUR:UR:
15:DsShSciServerUR:13:[GSF:DSSDSRV]:20:SC:NISE.002:54969547
EASTBOUNDINGCOORDINATE=51.0604389191257
WESTBOUNDINGCOORDINATE=23.6131934758888
SOUTHBOUNDINGCOORDINATE=-34.4565146796629
NORTHBOUNDINGCOORDINATE=-13.3465666034132
RANGEENDINGDATE=2000-07-02
RANGEENDINGTIME=08:00:00.000000
RANGEBEGINNINGDATE=2000-07-02
RANGEBEGINNINGTIME=07:55:00.000000
PGEVERSION=5.2.0
ANCILLARYINPUTPOINTER=UR:10:DsShESDTUR:UR:15:DsShSciServerUR:13:[GSF:DSSDSRV
]:
21:SC:MOD03.005:53353044
ANCILLARYINPUTTYPE=Geolocation
ASSOCIATEDSENSORSHORTNAME=MODIS
ASSOCIATEDPLATFORMSHORTNAME=Terra
ASSOCIATEDINSTRUMENTSHORTNAME=MODIS
SuccessfulRetrievalPct= 100.00
VeryHighConfidentClearPct= 49.79
HighConfidentClearPct= 10.73
UncertainConfidentClearPct= 5.81
LowConfidentClearPct= 33.67
CloudCoverPct250m= 29.97
ClearPct250m= 70.03
DayProcessedPct= 100.00
NightProcessedPct= 0.00
SunglintProcessedPct= 0.00
Snow_IceSurfaceProcessedPct= 0.00
LandProcessedPct= 34.69
WaterProcessedPct= 65.31
ShadowFoundPct= 0.16
ThinCirrusSolarFoundPct= 10.44
ThinCirrusIR_FoundPct= 1.32
NonCloudObstructionFoundPct= 0.20
MaxSolarZenithAngle= 64.69
MinSolarZenithAngle= 40.97
ALGORITHMPACKAGEACCEPTANCEDATE=June 1997
ALGORITHMPACKAGEMATURITYCODE=at-launch
ALGORITHMPACKAGENAME=ATBD-MOD-06
ALGORITHMPACKAGEVERSION=2
LOCALINPUTGRANULEID=MOD03.A2000184.0755.005.2005069030026.hdf,
MOD021KM.A20001
84.0755.005.2005069054025.hdf, MOD02QKM.A2000184.0755.005.2005069054025.hdf,
gog
e1_2_img.v1.coeff, ecosystem.img.v1.coeff, thresholds.dat.terra.v13.coeff,
GDAS_
0ZF.A2000184.0300.001.2000184120339,
REYNSST.A2000184.0000.002.2003014203215, SE
A_ICE.A2000183.1200.001.2000184200332, NISE.A2000185.0000.002.2005089052845
INSTRUMENTNAME=Moderate Resolution Imaging Spectroradiometer
LONGNAME=MODIS/Terra Cloud Mask and Spectral Test Results 5-Min L2 Swath
250m
and 1km
EXCLUSIONGRINGFLAG=N
GRINGPOINTLONGITUDE=29.5294571479218, 51.2906073812718, 48.4871861400328,
23.6
017950850662
GRINGPOINTLATITUDE=-13.3315942220045, -16.5007946153769, -34.658342782116,
-30
.843193454955
GRINGPOINTSEQUENCENO=1, 2, 3, 4
CLOUD_MASK_ALGORITHM_VERSION_NUMBER= 1.00
DESCRREVISION=5.0
PRODUCTIONHISTORY=PGE03:5.2.0
PROCESSINGENVIRONMENT=Processed at GDAAC
Subdatasets:
SUBDATASET_1_NAME=HDF4_EOS:EOS_SWATH:"C:\AMNH\ModisCloudImages\MOD35_L2.A200
01
84.0755.005.2005182222430.hdf":mod35:Scan_Start_Time
SUBDATASET_1_DESC=[406x270] Scan_Start_Time (64-bit floating-point)
SUBDATASET_2_NAME=HDF4_EOS:EOS_SWATH:"C:\AMNH\ModisCloudImages\MOD35_L2.A200
01
84.0755.005.2005182222430.hdf":mod35:Solar_Zenith
SUBDATASET_2_DESC=[406x270] Solar_Zenith (16-bit integer)
SUBDATASET_3_NAME=HDF4_EOS:EOS_SWATH:"C:\AMNH\ModisCloudImages\MOD35_L2.A200
01
84.0755.005.2005182222430.hdf":mod35:Solar_Azimuth
SUBDATASET_3_DESC=[406x270] Solar_Azimuth (16-bit integer)
SUBDATASET_4_NAME=HDF4_EOS:EOS_SWATH:"C:\AMNH\ModisCloudImages\MOD35_L2.A200
01
84.0755.005.2005182222430.hdf":mod35:Sensor_Zenith
SUBDATASET_4_DESC=[406x270] Sensor_Zenith (16-bit integer)
SUBDATASET_5_NAME=HDF4_EOS:EOS_SWATH:"C:\AMNH\ModisCloudImages\MOD35_L2.A200
01
84.0755.005.2005182222430.hdf":mod35:Sensor_Azimuth
SUBDATASET_5_DESC=[406x270] Sensor_Azimuth (16-bit integer)
SUBDATASET_6_NAME=HDF4_EOS:EOS_SWATH:"C:\AMNH\ModisCloudImages\MOD35_L2.A200
01
84.0755.005.2005182222430.hdf":mod35:Cloud_Mask
SUBDATASET_6_DESC=[6x2030x1354] Cloud_Mask (8-bit integer)
SUBDATASET_7_NAME=HDF4_EOS:EOS_SWATH:"C:\AMNH\ModisCloudImages\MOD35_L2.A200
01
84.0755.005.2005182222430.hdf":mod35:Quality_Assurance
SUBDATASET_7_DESC=[2030x1354x10] Quality_Assurance (8-bit integer)
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 512.0)
Upper Right ( 512.0, 0.0)
Lower Right ( 512.0, 512.0)
Center ( 256.0, 256.0)
> -----Original Message-----
> From: fwarmerdam at gmail.com [mailto:fwarmerdam at gmail.com] On Behalf Of
> Frank Warmerdam
> Sent: Wednesday, January 04, 2006 10:05 AM
> To: Ned Horning
> Cc: fwtools at lists.maptools.org
> Subject: Re: [FWTools] MODIS processing
>
> On 1/4/06, Ned Horning <nedh at lightlink.com> wrote:
> >
> >
> >
> > Greetings,
> >
> >
> >
> > I have some MODIS cloud images (MOD35 - a MODIS level 2 product) that I
> > would like to project into UTM and then do a binary AND to extract the
> > second and third bit and then save to GeoTIFF. I need to batch process a
few
> > hundred images so I was thinking this would be a good project to learn
to
> > write a python scrip in OpenEV_FW to reap some benefits from OpenEV and
> > GDAL. Has anyone out there done this sort of processing?
> >
> > From what I can tell gdalwarp needs an input projection but the MODIS
level
> > 2 products are georeferenced not projected (as far as I can tell) and
I'm
> > not sure how to deal with this. I see that GDAL can apply the
geolocation
> > information to the MODIS image when it is opened (It works in OpenEV_FW
> > although the GDAL documentation does not explicitly mention that
> > georeferencing is supported for HDF MODIS level 2 imagery) but I would
like
> > to know how to project the georeferenced MODIS image if this is
possible.
>
> Ned,
>
> Does the MODIS HDF image appear to have GCPs? I
> would imagine that is what OpenEV is using for geolocation.
> If so, you can use gdalwarp to rectify the image to UTM.
>
> eg.
>
> gdalwarp -t_srs '+proj=utm +zone=11 +datum=WGS84' infile outfile
>
> You might want to use the -order argument to limit the polynomial
> order to 2, if you find problems with it. You can check the GCPs
> with gdalinfo.
>
> Best regards,
> --
>
---------------------------------------+------------------------------------
--
> I set the clouds in motion - turn up | Frank Warmerdam,
warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the FWTools
mailing list