Changes between Version 42 and Version 43 of FAQ
- Timestamp:
- Sep 4, 2010, 3:44:00 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
FAQ
v42 v43 6 6 * [wiki:Install How to install] 7 7 * [wiki:FormatsSupported Data formats supported] 8 * [wiki:CommonRasqlQueryProblems Common rasql Query Problems] (TBD)9 8 * [wiki:CommonWcpsQueryProblems Common WCPS Query Problems] 10 9 11 10 == Questions and Answers == 11 12 === Installation === 12 13 13 14 * '''Q: Using ''automake'' I get an error message "directory should not contain /" - what can I do?''' … … 34 35 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. 35 36 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 36 41 * '''Q: I get C++ compilation errors.''' 37 42 … … 51 56 {{{ tcpip_socket = true }}} 52 57 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 === 54 59 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 {{{ 68 for 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 {{{ 73 for c in (rgb) return count(c.0 = 0) 74 }}} 75 76 '''''Solution''''' : Add 1 to the input: 77 {{{ 78 for c in (rgb) return encode(log(c.0+1), "jpeg") 79 }}} 56 80 57 81 * '''Q: When using division "/" as an induced operation I get unexpected results.''' 58 82 59 83 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. 60 90 61 91 * '''Q: Using ''automake'' on petascope I get an error message "directory should not contain /" - what can I do?''' … … 67 97 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. 68 98 69 * '''Q: I want to use a different version of PostgreSQL. Is that possible?'''70 99 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