Opened 13 years ago
Closed 12 years ago
#77 closed defect (fixed)
Data exchange format wrong file name extension
Reported by: | Owned by: | Dimitar Misev | |
---|---|---|---|
Priority: | minor | Milestone: | 8.4 |
Component: | clientcomm | Version: | 8.2 |
Keywords: | Cc: | Dimitar Misev, Peter Baumann | |
Complexity: | Medium |
Description
bug derived by a discussion on rasdaman-users mailing list at
http://groups.google.com/group/rasdaman-users/browse_thread/thread/54d698e038a98fb9?hl=en
I'm working with the latest rasdaman version available by git.
When I select data from a collection and I try to encode results into a specific file format, the files selected are always saved with the ".unknown" extension instead of the correct file type suffix.
It seems a little problem related only to the file name because the data are encoded correctly.
X Peter and Dimitar, if you want to verify this issue you can use the System provided in Munich by EOX. Also the rasdaman installed on the Key is affected by this problem.
I can not verify if the virtual machines provided for the Earth Server project by EOX are OK. Currently i'm working with an own installation of Rasdaman and I don't use the packages prepared by EOX.
Examples:
rasql -q "select tiff(i) from rgb as i" —out file
rasql: rasdaman query tool v1.0, rasdaman v8 — generated on 14.10.2011 17:27:00.
opening database RASBASE at localhost:7001...ok
Executing retrieval query…ok
Query result collection has 1 element(s):
Result object 1: going into file rasql_1.unknown…ok.
rasql done.
rasql -q "select png(i) from mr as i" —out file
rasql: rasdaman query tool v1.0, rasdaman v8 — generated on 14.10.2011 17:27:00.
opening database RASBASE at localhost:7001...ok
Executing retrieval query…ok
Query result collection has 3 element(s):
Result object 1: going into file rasql_1.unknown…ok.
Result object 2: going into file rasql_2.unknown…ok.
Result object 3: going into file rasql_3.unknown…ok.
rasql done.
rasql -q "select jpeg(i) from aatsr as i" —out file
rasql: rasdaman query tool v1.0, rasdaman v8 — generated on 14.10.2011 17:27:00.
opening database RASBASE at localhost:7001...ok
Executing retrieval query…ok
Query result collection has 8 element(s):
Result object 1: going into file rasql_1.unknown…ok.
Result object 2: going into file rasql_2.unknown…ok.
Result object 3: going into file rasql_3.unknown…ok.
Result object 4: going into file rasql_4.unknown…ok.
Result object 5: going into file rasql_5.unknown…ok.
Result object 6: going into file rasql_6.unknown…ok.
Result object 7: going into file rasql_7.unknown…ok.
Result object 8: going into file rasql_8.unknown…ok.
rasql done.
Damiano
Change History (8)
comment:1 by , 13 years ago
Cc: | added |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:2 by , 13 years ago
comment:3 by , 13 years ago
Cc: | added |
---|
Or you can simply use the libmagic library which should do the guessing for you: http://linux.die.net/man/3/libmagic
comment:4 by , 12 years ago
Owner: | removed |
---|
comment:5 by , 12 years ago
Milestone: | → 9.0 |
---|---|
Owner: | set to |
comment:6 by , 12 years ago
I fixed it in rasdaman without guessing any magic bits.. there were some bugs on the client API as well as in the conversion query tree node. Also made it to work for the encode() function besides tiff(), png(), etc.
comment:7 by , 12 years ago
Owner: | changed from | to
---|
comment:8 by , 12 years ago
Component: | applications → clientcomm |
---|---|
Milestone: | 9.0 → 8.4 |
Resolution: | → fixed |
Status: | assigned → closed |
Fixed by changeset:4231ab7
Uma Shankar, this might be helpful: http://en.wikipedia.org/wiki/Magic_number_%28programming%29#Magic_numbers_in_files
As you can see most of these formats begin/end with some 'magic' bits, so it should be fairly simple to figure out the format of the output file.