Changes between Version 42 and Version 43 of FAQ


Ignore:
Timestamp:
Sep 4, 2010, 3:44:00 PM (14 years ago)
Author:
Peter Baumann
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • FAQ

    v42 v43  
    66   * [wiki:Install How to install]
    77   * [wiki:FormatsSupported Data formats supported]
    8    * [wiki:CommonRasqlQueryProblems Common rasql Query Problems] (TBD)
    98   * [wiki:CommonWcpsQueryProblems Common WCPS Query Problems]
    109
    1110== Questions and Answers ==
     11
     12=== Installation ===
    1213
    1314 * '''Q: Using ''automake'' I get an error message "directory should not contain /" - what can I do?'''
     
    3435   A: What appears to have happened is that in PostgreSQL 8.3.0 they removed ECPGget_connection and they have reintroduced it by 8.3.7. So PostgreSQL versions 8.3.0 up to (but excluding) 8.3.7 cannot be used.
    3536
     37 * '''Q: I want to use a different version of PostgreSQL. Is that possible?'''
     38
     39   A: You need to include a different JDBC postgresql driver (as a JAR) in the libraries folder and update the Makefile as needed. Then you can try out another PostgreSQL version, it may or may not work. Let us know your experiences to update this information!
     40
    3641 * '''Q: I get C++ compilation errors.'''
    3742
     
    5156      {{{ tcpip_socket = true }}}
    5257
    53  * '''Q: Aggregation result from ''select max_cells(c.0) from rgb as c'': If I send this query via command line (rasql utility), then the result is 255; if I send this query via RasJ, then the result is -1.'''
     58=== Rasql queries ===
    5459
    55    A: Java does not have an 8-bit unsigned data type. Byte is a signed 8 bit and hence 255 is represented as -1. What you can do is to transform bytes to char by adding 2^8 if the 2^7 bit is set. Tested, works.
     60 * '''Q: This insert query produces error 821 (cell type mismatch) although I provide a TIFF file with correct pixel type:'''
     61      {{{ insert into FloatCollection values inv_tiff( $1 )}}}
     62
     63   A: You need to provide an explicit cast (see section 9.8 in the Rasql Guide); a correct phrasing of this query is:
     64      {{{ insert into FloatCollection values (float) inv_tiff( $1 )}}}
     65
     66 * '''Q: This query doesn't work:'''
     67{{{
     68for c in (rgb) return encode(log(c.0), "jpeg")
     69}}}
     70
     71   A: The '''log''' function needs positive numbers as arguments, and will return -Infinity if the argument is 0. You need to make sure that the input does not contain any zeros. You can check that using the query
     72{{{
     73for c in (rgb) return count(c.0 = 0)
     74}}}
     75
     76   '''''Solution''''' : Add 1 to the input:
     77{{{
     78for c in (rgb) return encode(log(c.0+1), "jpeg")
     79}}}
    5680
    5781 * '''Q: When using division "/" as an induced operation I get unexpected results.'''
    5882
    5983   A: Division of two integers yields an integer. If you want to have a float result then you need to cast the operands (that is: at least one of them) to float or double.
     84
     85=== Rasj and Java ===
     86
     87 * '''Q: Aggregation result from ''select max_cells(c.0) from rgb as c'': If I send this query via command line (rasql utility), then the result is 255 as expected; if I send this query via RasJ, then the result is -1.'''
     88
     89   A: Java does not have an 8-bit unsigned data type. Byte is a signed 8 bit and hence 255 is represented as -1. What you can do is to transform bytes to char by adding 2^8 if the 2^7 bit is set. Tested, works.
    6090
    6191 * '''Q: Using ''automake'' on petascope I get an error message "directory should not contain /" - what can I do?'''
     
    6797   A: There might be a conflict with the locally provided libraries, to be found at directory $PETASCOPE/lib. Check them, and if you find a mismatch then remove them and use the resp. libraries of your local installation instead. Alternatively, consider upgrading your Java SDK to version 1.6.
    6898
    69  * '''Q: I want to use a different version of PostgreSQL. Is that possible?'''
    7099
    71    A: You need to include a different JDBC postgresql driver (as a JAR) in the libraries folder and update the Makefile as needed. Then you can try out another PostgreSQL version, it may or may not work. Let us know your experiences to update this information!
     100=== WCPS ===
     101