Re: ms2gt .gpd and .mpp file creation [message #71170] |
Mon, 07 June 2010 19:41  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
katb writes:
> Thanks for your input David - I will try your suggestion, I know you
> are quite knowledgeable in this area so just quickly do you have any
> suggestions for determining the number of rows and number of columns
> required for the resulting grid? I have been following ms2gt tutorials
> and I find 'gtest' confusing.
The number of rows and columns you need depends entirely on
what you want the resolution of your grid to be. If you have
25km data, there is no sense making the resolution of your
grid 500 meters. You could make it 10 or 20 km. Then it is
just a question of how much ground you want to cover.
Suppose you had a grid of 20 km and you wanted to see an
area of 5000 km by 4000 km. Then your grid would be 250 by 200.
I typically locate the center of my grid (as in the GPD
file I suggested previously), then just decide how much
of the world I want to see in my grid at what resolution.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: ms2gt .gpd and .mpp file creation [message #71176 is a reply to message #71170] |
Mon, 07 June 2010 18:03   |
katb
Messages: 4 Registered: June 2010
|
Junior Member |
|
|
On Jun 7, 10:50 pm, David Fanning <n...@dfanning.com> wrote:
> katb writes:
>> I am hoping someone can help shed some light on this problem. I am
>> trying to reproject MODIS MOD02HKM 500m hdf data to Lambert Conic
>> Conformal Ellipsoid projection at 500m resolution using ms2gt. The
>> tutorials execute fine so my software configuration (links to IDL) are
>> ok. I am having difficulties preparing .gpd and .mpp files for
>> Australia as most of the examples are for Greenland or for another
>> projection. I also believe the errors are related to the number of
>> columns and rows I have entered for the .gpd files. I have tried
>> downloading David Fanning's gpd_viewer however it does not support the
>> projection I require.
>
>> My gpd file is as follows:
>
>> test.mpp map projection parameters
>> Map Projection: Lambert Conic Conformal Ellipsoid
>> Map Reference Latitude: -35.0
>> Map Second Reference Latitude: -40.0
>> Map Reference Longitude: 140.0
>> Map Scale: 1
>> Map Equatorial Radius: 6378.137
>> Map Eccentricity: 0.081819190843
>> Grid Map Units per Cell: 0.50
>> Grid Width: 2200
>> Grid Height: 1700
>> Grid Map Origin Column: 1099.5
>> Grid Map Origin Row: 849.5
>
>> My .mpp file is as follows:
>> Lambert Conic Conformal Ellipsoid
>> -36.5 147.0 lat0 lon0
>> 0.0 rotation
>> 0.50 scale (km/pixel)
>> -36.5 147.0 center lat lon
>> -35.0 144.0 lat min max
>> -38.0 150.0 lon min max
>> 1753 760 grid
>> 0.00 00.00 label lat lon
>> 1 0 0 cil bdy riv
>
>> The error I recieve when I execute ms2gt for two adjacent hdf files in
>> the listfile.txt is as follows:
>
>> fornav: ReadImage: error reading tester_cols_02708_00406_00000_20.img
>
> Sigh... These GPD files always confuse me. I think there are
> only two or three people in the world who understand them.
> Fortunately, they work with me, so I can check later.
>
> But that said, I would make a couple of changes here. You
> don't need an mpp file here, so you can eliminate that
> complication. And I would express your distances in meters
> (this may be a personal preference). But I would try a GPD
> file like this:
>
> Map Projection: Lambert Conic Conformal Ellipsoid
> Map Reference Latitude: -35.0
> Map Second Reference Latitude: -40.0
> Map Reference Longitude: 140.0
> Map Equatorial Radius: 6378137.0
> Map Eccentricity: 0.081819190843
> Map Origin Latitude: -27.0
> Map Origin Longitude: 140.0
> Map Origin X: -550000
> Map Origin Y: 425000
> Grid Map Units per Cell: 500
> Grid Width: 2200
> Grid Height: 1700
> Grid Map Origin Column: -0.5
> Grid Map Origin Row: -0.5
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Thanks Klemen - I thought ms2gt would be easier as i haven't had a
great deal of idl experience! If I can't get this going soon I will
probably resort to idl directly.
Thanks for your input David - I will try your suggestion, I know you
are quite knowledgeable in this area so just quickly do you have any
suggestions for determining the number of rows and number of columns
required for the resulting grid? I have been following ms2gt tutorials
and I find 'gtest' confusing.
Thanks again.
Kat
|
|
|
|
|
Re: ms2gt .gpd and .mpp file creation [message #71301 is a reply to message #71170] |
Tue, 08 June 2010 16:51   |
katb
Messages: 4 Registered: June 2010
|
Junior Member |
|
|
On Jun 8, 12:41 pm, David Fanning <n...@dfanning.com> wrote:
> katb writes:
>> Thanks for your input David - I will try your suggestion, I know you
>> are quite knowledgeable in this area so just quickly do you have any
>> suggestions for determining the number of rows and number of columns
>> required for the resulting grid? I have been following ms2gt tutorials
>> and I find 'gtest' confusing.
>
> The number of rows and columns you need depends entirely on
> what you want the resolution of your grid to be. If you have
> 25km data, there is no sense making the resolution of your
> grid 500 meters. You could make it 10 or 20 km. Then it is
> just a question of how much ground you want to cover.
>
> Suppose you had a grid of 20 km and you wanted to see an
> area of 5000 km by 4000 km. Then your grid would be 250 by 200.
>
> I typically locate the center of my grid (as in the GPD
> file I suggested previously), then just decide how much
> of the world I want to see in my grid at what resolution.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Thanks alot for your help David.
Unfortunately, I still can't get it to work, at least I know my .gpd
files are probably ok - I have contacted the NSIDC for help. I'll post
up if I have any success for others in the future.
|
|
|
Re: ms2gt .gpd and .mpp file creation [message #71739 is a reply to message #71301] |
Thu, 15 July 2010 22:46  |
katb
Messages: 4 Registered: June 2010
|
Junior Member |
|
|
OK so I finally have it all working now so here is a post for others
having similar issues with ms2gt reprojection tool for MODIS data!
There were two problems:
1) ms2gt likes to run in tcsh (i was using bash with a few work
arounds)
2) the gpd file needs to be fine tuned for your particular area
Map Origin X and Map Origin Y (top left corner of desired projected
grid space) is distance in metres from prescribed Map Origin Lat/Long
point (-32.7, 146.1) to the desired lat/long coordinates for the top-
left corner (in this case i wanted the top-left corner of my
reprojection area to be -34.23, 143.51) of the area you wish to
reproject data to. So for this case the top left corner of the
projected grid is to the west (negative X or left) and to the south
(negative Y or down).
for a reprojection grid bound by top-left lat/long of -34.23, 143.51
and bottom-right lat/long -43.89, 151.0 in Lambert Conformal Conic
reprojection space the gpd file ended up looking like this
Map Projection: Lambert Conic Conformal Ellipsoid
Map Reference Latitude: -27.5
Map Second Reference Latitude: -35.0
Map Reference Longitude: 146.1
Map Equatorial Radius: 6378137.0
Map Eccentricity: 0.081819190843
Map Origin Latitude: -32.7
Map Origin Longitude: 146.1
Map Origin X: -238500
Map Origin Y: -172500
Grid Map Units per Cell: 500
Grid Width: 1400
Grid Height: 2300
Grid Map Origin Column: -0.5
Grid Map Origin Row: -0.5
use crtest and xytest to test your .gpd file reprojection coordinates
and lat/longs prior to running ms2gt.
hope this is useful to someone, somewhere, sometime.
cheers
|
|
|