Ticket #3548 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

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

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

Change History

follow-up: ↓ 2   Changed 3 years ago by warmerdam

  • keywords PDS added
  • component changed from default to GDAL_Raster

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   Changed 3 years ago by vijayansiva

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.

  Changed 3 years ago by vijayansiva

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

  Changed 3 years ago by warmerdam

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to 1.7.3

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.

  Changed 3 years ago by vijayansiva

  • priority changed from normal to highest
  • status changed from closed to reopened
  • resolution fixed deleted

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

  Changed 3 years ago by warmerdam

  • priority changed from highest to normal

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.

Changed 3 years ago by vijayansiva

  Changed 3 years ago by vijayansiva

  • priority changed from normal to highest

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

  Changed 3 years ago by vijayansiva

  • priority changed from highest to normal

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.

  Changed 3 years ago by rouault

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

  Changed 3 years ago by vijayansiva

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

  Changed 3 years ago by vijayansiva

hi all,

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

  Changed 3 years ago by rouault

  • status changed from reopened to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.