Opened 5 years ago

Closed 4 years ago

#77 closed defect (fixed)

Data exchange format wrong file name extension

Reported by: Damiano Barboni <barboni@…> Owned by: dmisev
Priority: minor Milestone: 8.4
Component: clientcomm Version: 8.2
Keywords: Cc: dmisev, pbaumann
Complexity:

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 Changed 5 years ago by dmisev

  • Cc dmisev added
  • Owner changed from pbaumann to upanday
  • Status changed from new to assigned

comment:2 Changed 5 years ago by dmisev

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.

comment:3 Changed 5 years ago by dmisev

  • Cc pbaumann 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 Changed 5 years ago by dmisev

  • Owner upanday deleted

comment:5 Changed 4 years ago by pbaumann

  • Milestone set to 9.0
  • Owner set to hstamerjohanns

comment:6 Changed 4 years ago by dmisev

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 Changed 4 years ago by dmisev

  • Owner changed from hstamerjohanns to dmisev

comment:8 Changed 4 years ago by dmisev

  • Component changed from applications to clientcomm
  • Milestone changed from 9.0 to 8.4
  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.