Opened 17 years ago
Closed 15 years ago
#1860 closed defect (fixed)
[PATCH] JPG JGW files with blank lines not recognized
Reported by: | Arkygeek | Owned by: | Even Rouault |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | GDAL_Raster | Version: | svn-trunk |
Severity: | normal | Keywords: | worldfile jpg jgw |
Cc: | warmerdam, Even Rouault, Mateusz Łoskot |
Description
At the moment, if the .jgw file contains blank lines, you must manually remove them before gdal recognizes them as valid.
Attachments (3)
Change History (10)
by , 17 years ago
Attachment: | 35E32N_G.JGW added |
---|
by , 17 years ago
Attachment: | gdal_svn_trunk_wld_with_blk_lines_bug1860.patch added |
---|
comment:2 by , 17 years ago
Cc: | added |
---|---|
Component: | default → GDAL_Raster |
Keywords: | worldfile added |
Owner: | changed from | to
Version: | unspecified → svn-trunk |
We have a previous bug report on this issue, and the solution at the time was to just treat world files with blank lines as invalid. Mateusz, I think that was yours? Could you dig up the reference and reference here?
I would like to understand more about what software generates world files with blank lines, and why. Are they always in the specific form given in the first example?
I'm not against Even's suggested patch but I worry that we are "reaching" to much and may end up interpreting garbage files as world files.
comment:3 by , 17 years ago
In fact this was reported on #gdal on IRC yesterday by arkygeek and he mentionned that it came from http://gaialab.asu.edu/Jordan/SL50k/35e32n_g.zip (main page : http://gaialab.asu.edu/Jordan/)
I tried the jpeg and jgw from 35e32n_g.zip with GlobalMapper8 and it was able to understand the jgw. So, it's not like as if GDAL would try to be cleverer than other existing GIS... We could imagine also issuing a warning when we detect blank lines to make the user aware that its worldfile may be not understood by other GIS.
Out of curiosity, I've taken a look at readWorldFile from mapserver/mapraster.c and it blindly assumes that there are 6 non-empty lines. So, should we consider extending readWorldFile too if we extend GDALReadWorldFile ?
I think the previous bug report you're mentionning was #1523.
comment:4 by , 17 years ago
Here there are a few more details on how this dataset was produced.
Just of curiosity, I've searched GlobalMapper release notes and could see the following entries :
- Added support for reading coordinates from world files where the coordinates are separated with tabs rather than being on separate lines.
- Added automatic detection of world files that have an extra .txt appended to the filename.
comment:5 by , 17 years ago
Summary: | JPG JGW files with blank lines not recognized → [PATCH] JPG JGW files with blank lines not recognized |
---|
comment:6 by , 16 years ago
Cc: | added |
---|---|
Keywords: | jpg jgw added |
Owner: | changed from | to
comment:7 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This change has been incorporated as part of a merge of ESRI changes in trunk (r17121).
test case