{"action":"closed","issue":{"url":"https://api.github.com/repos/OSGeo/gdal/issues/955","repository_url":"https://api.github.com/repos/OSGeo/gdal","labels_url":"https://api.github.com/repos/OSGeo/gdal/issues/955/labels{/name}","comments_url":"https://api.github.com/repos/OSGeo/gdal/issues/955/comments","events_url":"https://api.github.com/repos/OSGeo/gdal/issues/955/events","html_url":"https://github.com/OSGeo/gdal/issues/955","id":365234011,"node_id":"MDU6SXNzdWUzNjUyMzQwMTE=","number":955,"title":"PDS \"v3\" detached label calculates wrong LineOff","user":{"login":"thareUSGS","id":3095138,"node_id":"MDQ6VXNlcjMwOTUxMzg=","avatar_url":"https://avatars2.githubusercontent.com/u/3095138?v=4","gravatar_id":"","url":"https://api.github.com/users/thareUSGS","html_url":"https://github.com/thareUSGS","followers_url":"https://api.github.com/users/thareUSGS/followers","following_url":"https://api.github.com/users/thareUSGS/following{/other_user}","gists_url":"https://api.github.com/users/thareUSGS/gists{/gist_id}","starred_url":"https://api.github.com/users/thareUSGS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thareUSGS/subscriptions","organizations_url":"https://api.github.com/users/thareUSGS/orgs","repos_url":"https://api.github.com/users/thareUSGS/repos","events_url":"https://api.github.com/users/thareUSGS/events{/privacy}","received_events_url":"https://api.github.com/users/thareUSGS/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-09-30T15:31:52Z","updated_at":"2018-10-06T08:43:19Z","closed_at":"2018-10-06T08:43:19Z","author_association":"NONE","body":"<!--\r\n\r\nQuestions should go to the gdal-dev mailing list (https://lists.osgeo.org/mailman/listinfo/gdal-dev)\r\nor other support forums. GitHub issues are for bug reports and suggestions\r\nfor new features.\r\n-->\r\n\r\n## Expected behavior and actual behavior.\r\n\r\nFails to open/convert PDS label. It is pointing into a FITS file (but it the FITS should be treated as raw). The PDS3 label should describe it for opening.\r\n\r\nUsing environment variable \"CPL_DEBUG=ON\", I can see the listed \"rawRasterBand\" is incorrectly setting to LineOff=8640 instead of LineOff=6000.\r\n\r\nI was originally blaming the skipbytes but that looks good.\r\n\r\nI think the line might be: https://github.com/OSGeo/gdal/blob/04296c631cf9d73cb8f20ed5cb6ecd519b3b9bd6/gdal/frmts/pds/pdsdataset.cpp#L1035\r\n\r\nwalking though the code, it seems all should be working and nLineOffset would correctly equal 6000...?\r\n\r\nI'm not sure how LineOff is getting calculated to 8640? That is 2880 * 3 (but perhaps just happenstance).\r\n\r\nI don't see anything in the label formatting to throw this off, so I am at a loss to figure it out.  I am not worried about other aspects of this label (like no projection) -- just the pixel read.\r\n\r\n## Steps to reproduce the problem.\r\ntest file: https://www.dropbox.com/s/f80t7a94v7om0at/038.zip?dl=0\r\n\r\n```\r\n> gdal_translate map_000_038.lbl tst.tif   ## w/ \"CPL_DEBUG=ON\"\r\nGNM: GNMRegisterAllInternal\r\nGNM: RegisterGNMFile\r\nGNM: RegisterGNMdatabase\r\nGDALRaw: RawRasterBand(00000288D39EE910,1,0000000000000000,\r\n              Off=2880,PixOff=1,LineOff=8640,Byte,1)\r\nPDS: using projection\r\n\r\n\r\nPDS: Dataset projection  is not supported. Continuing...\r\nGDAL: GDALOpen(map_000_038.lbl, this=00000288D39EE910) succeeds as PDS.\r\nInput file size is 6000, 3000\r\nGDAL: Using GTiff driver\r\n0GDAL: GDAL_CACHEMAX = 613 MB\r\nGDAL: GDALDatasetCopyWholeRaster(): 6000*1666 swaths, bInterleave=0\r\n...10...20...30...40...50...ERROR 3: Failed to read scanline 2083.\r\nERROR 1: map_000_038.lbl, band 1: IReadBlock failed at X offset 0, Y offset 2083: Failed to read scanline 2083.\r\nGDAL: GDALClose(map_000_038.lbl, this=00000288D39EE910)\r\nGDAL: In GDALDestroy - unloading GDAL shared library.\r\n```\r\n\r\nNote: The provide VRT in the download, just shows how the FITS should be opened (and look).\r\n\r\n## Operating system\r\n\r\nWindows 10 and CentOS Linux release 7.2.1511\r\n\r\n## GDAL version and provenance\r\n\r\n2.3.1 version from conda-forge\r\n"}}
{"actor":{"display_login":"rouault"}}