Opened 14 years ago

Closed 14 years ago

#3548 closed defect (fixed)

gdal_translate error

Reported by: vijayansiva Owned by: warmerdam
Priority: normal Milestone: 1.7.3
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: PDS
Cc:

Description

hi,

I am using GDAL for conversion from PDS to tiff format, but there is a problem. While using gdal_translate the original image was split into two. The projection is applied to the image but the coordinates are also not in agreement with the header file. Can any one help me in this regard.

The original image and supporting files

Download link: http://rapidshare.com/files/36763099...239E3144SC.img

http://rapidshare.com/files/36764154...239E3144SC.lbl

http://rapidshare.com/files/36764154...239E3144SC.ctg

http://rapidshare.com/files/36764154...239E3144SC.dqa

correct image should look like

http://rapidshare.com/files/379699797/DTMTCO_02_01731N239E3144SC.jpg.html

After conversion the image was shifted to right side and looks like

split into two. How to short it out and get like original image.

Attachments (1)

gdalconverted.jpg (348.6 KB ) - added by vijayansiva 14 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 by warmerdam, 14 years ago

Component: defaultGDAL_Raster
Keywords: PDS added

I find I am unable to download any of the urls with ... in the middle. The final .jpg.html file works ok.

in reply to:  1 comment:2 by vijayansiva, 14 years ago

Replying to warmerdam:

I find I am unable to download any of the urls with ... in the middle. The final .jpg.html file works ok.

hi,

herewith i am giving the correct link to download the pds image. When applying gdal_translate the image is shifted to the right. (the problem is with file which contained multiple entries for a number of rows and column in the image.)

http://hotfile.com/dl/39937365/7e097b9/DTMTCO_02_01731N239E3144SC.rar.html (or) http://www.easy-share.com/1910044811/DTMTCO_02_01731N239E3144SC.rar

help me to get the correct image with projection details.

comment:3 by vijayansiva, 14 years ago

hi,

i want to convert a PDS image to geotiff. if i use gdal_translate it is splitting image into two. there is some problem in image header (hope so- that is the image contains multiple entries for a number of rows and column)

the image link is http://hotfile.com/dl/39937365/7e097b9/DTMTCO_02_01731N239E3144SC.rar.html

help me to solve this problem

comment:4 by warmerdam, 14 years ago

Milestone: 1.7.3
Resolution: fixed
Status: newclosed

I have downloaded the last rar and examined the image. It is unconventional in that it has RECORD_TYPE of UNDEFINED and the RECORD_BYTES field is missing, and the IMAGE is expressed in <BYTES> instead of records.

The lack of a RECORD_BYTES actually was causing a crash with the latest code (likely true of GDAL 1.7.2), which had some recent dependency added on this field.

I think I have made appropriate adjustments for these various problems and now the image works well with trunk. The changes are in trunk (r19662) and 1.7 (r19663).

Let me know if a problem persists with this latest code.

comment:5 by vijayansiva, 14 years ago

Priority: normalhighest
Resolution: fixed
Status: closedreopened

hi,

The image attached in the link (.img) is split into two if i use gdal_translate to convert from pds to tif format. I made the changes in trunk 1.7(r19663) but still my image is split into two. As i am new to GDAL i need help on this issue to obtain the correct image.

note: the image loads correctly if i open it in ENVI; if i do gdal_translate and open it shows the splited image.

http://hotfile.com/dl/44006714/952f8d0/DTMTCO_02_01731N239E3144SC.rar.html

thanks

comment:6 by warmerdam, 14 years ago

Priority: highestnormal

I have tried the latest trunk and 1.7 branch code on the provided file, and the resulting image looks fine. Can you try with the snapshot code from the 1.7 branch (or trunk) and see if you still have the problem?

There have been multiple fixes in the PDS code in recent months and I wonder if you have them all.

by vijayansiva, 14 years ago

Attachment: gdalconverted.jpg added

comment:7 by vijayansiva, 14 years ago

Priority: normalhighest

hi,

still there is problem for me in getting the correct image. Could you explain me little bit more how to make changes and run the file ( i am using gdal with FWtools2.4.7).

herewith i had attached the image which i got while using gdal_translate.

http://hotfile.com/dl/44397338/725b6e1/gdal.rar.html

thank you

comment:8 by vijayansiva, 14 years ago

Priority: highestnormal

hi,

try gdal_translate for the below given image (link) from pds to tif, the image was shifted to right and splitted.

http://hotfile.com/dl/44006714/952f8d0/DTMTCO_02_01731N239E3144SC.rar.html

How to fix it explain me as i am new to gdal. I made the changes in trunk 1.7(r19663) but still problem. I dont know whether the changes made in trunk is correct or not. So tell me how to make changes in trunk(r29663) and how to execute it.

comment:9 by Even Rouault, 14 years ago

Download at http://download.osgeo.org/gdal/daily/ one of the source packages (either trunk = dev version or stable = 1.7). Or if you're working on Windows, you can also directly use one of the daily binary builds at : http://vbkto.dyndns.org:1280/sdk/Default.aspx

comment:10 by vijayansiva, 14 years ago

hi,

i have downloaded the binaries for the windows (that contains the changes in code on frmts/pds/pdsdataset). i am a newbie i don't know how to use the new binaries ie how to compile them with my FWtools2.4.7. help me to how to use new binaries and resolve my problem in the image.

thank u

comment:11 by vijayansiva, 14 years ago

hi all,

thanks a lot, the code works fine and the image comes correctly. thanks a lot :)

comment:12 by Even Rouault, 14 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.