On Mar 20, 4:42 pm, Raj <rbale...@gmail.com> wrote:
> Hi I am trying to change the projection of the file from EASE-Grid
> Equal Area cylindrical to geographic by using the following:
>
> o_proj = envi_proj_create(/geographic)
>
> envi_convert_file_map_projection, fid=fid, $
> pos=pos, dims=[-1l, 0, 1382, 0, 585], o_proj=o_proj,
> $;o_pixel_size=o_pixel_size,$
> out_name=out_name
>
> Even though I am explicitly specifying the dims size, the number of
> samples and Lines changes from 1383, 586 to 1598, 754 in the output
> file.
>
> Is there a way to avoid this?
>
> Please Advise
>
> The header info of Input file is as follows
>
> ENVI
> description = {
> File Imported into ENVI.}
> samples = 1383
> lines = 586
> bands = 1
> header offset = 0
> file type = ENVI Standard
> data type = 12
> interleave = bsq
> sensor type = Unknown
> byte order = 0
> map info = {EASE-Grid Global, 1.5000, 1.5000, -17321659.7750,
> 7332251.0625, 2.5067525000e+04, 2.5067525000e+04, WGS-84,
> units=Meters}
> projection info = {99, 6371228.0, 6371228.0, 0.000000, 0.000000, 0.0,
> 0.0, 30.000000, EASE-Grid Global, WGS-84, User Proj Cylind Equal Area,
> units=Meters}
> wavelength units = Unknown
>
> The header info of output file is as follows
>
> ENVI
> description = {
> File map projection conversion result.Method: 1st degree RST w/
> nearest
> neighbor [Fri Mar 20 15:48:40 2009]}
> samples = 1598
> lines = 754
> bands = 1
> header offset = 0
> file type = ENVI Standard
> data type = 12
> interleave = bsq
> sensor type = Unknown
> byte order = 0
> map info = {Geographic Lat/Lon, 1.0000, 1.0000, -179.99999578,
> 86.71674408, 2.2518540843e-001, 2.2670304577e-001, WGS-84,
> units=Degrees}
> wavelength units = Unknown
>
> Thanks & Regards,
> Rajesh
Well, I am pretty sure that the DIMS keyword to
ENVI_CONVERT_FILE_MAP_PROJECTION is for specifying the region in the
input file to be converted. After conversion the output may not (and
often does not, depending on what projections are used) have the same
number of pixels.
I also think the map info for the input file looks very strange. The
way I read it, the map_info structure is saying that the pixel size
for that image is 2.5067525000e+04, i.e. 25,067 meters. I suggest that
may not be correct. In fact, given that oddity I am amazed you got a
result that even remotely was sane. How did the image look?
|