If you open a Excel or Word 2010 document that is stored on Alfresco 4.2c (the problem does not occur with Powerpoint) via CIFS, you get a message that the file is already open by "another user", even if it isnt.
This bug has been seen in many Alfresco versions, but also in the latest community release 4.2c (CIFS/Office 2010 - File locked after creation).
The reason for this seems that Office 2010 acquired more than one lock per open file and forgets to close at least one of them.
Since Office 2010 allows webdav Links to be used directly in File dialogs (open/save), and webdav does not seem to produce these issues, this is a viable workaround.
Also, under Windows 7 and later, webdav can be mounted just like a normal CIFS drive, which also avoids these problems.
(This has the nive side-effects that the server is only about half as busy as with CIFS, also if you serve the data via HTTPS, the data is encrypted which it isn't via CIFS).
2013-02-24
2011-08-08
Statistical Processing of EVI and NDVI from MODIS in ArrcGIS 10 using Python
OK, ArcGIS got much better with version 10. I did not even mind having to re-write all of my scripts, since now, Python is really integrated. The only thing worrying me now is the performance and some file name issues (see below).
With this script, I can batch-process a number of Nasa HDF files. First, the data of the NDVI (Normalized Difference Vegetation Index) and the EVI (Enhanced Vegetation Index) band is extracted. Then we re-scale it (for storage, the data was multiplied by 1E4).
Finally, I create a zonal statistic for a 320 km buffer around Zurich.
You notice that I replace all dots by underscores in line 48. This is needed because ArcGis otherwise has trouble identifying the datatype (which is done by extension).
Have fun!
With this script, I can batch-process a number of Nasa HDF files. First, the data of the NDVI (Normalized Difference Vegetation Index) and the EVI (Enhanced Vegetation Index) band is extracted. Then we re-scale it (for storage, the data was multiplied by 1E4).
Finally, I create a zonal statistic for a 320 km buffer around Zurich.
You notice that I replace all dots by underscores in line 48. This is needed because ArcGis otherwise has trouble identifying the datatype (which is done by extension).
Have fun!
2010-10-29
Running SQLite on Andrew File System (AFS)
For my project CAMxRunner, I needed fast and reliable storage for runtime data. I started out with simple files, but it became cumbersome.
SQLite is a nice alternative, especially because it supports standard SQL and beyond. However, there are a number of things to keep in mind when running it on AFS, because AFS has no support for byte-range locks currently. This means that SQLite needs to be compiled in such a way that file locks (flock) are used:
Scary (and wrong) error message
When SQLite was compiled as shown, it has the nasty habit of issuing the error "I/O error" instead of "Database locked". If you are data-sensitive like me, this error may scare you somewhat, but my tests so far have shown that it is just the wrong text being issued.
Maintenance tasks
Like any database, SQLite needs a bit of maintenance (of course, considerable less than, say, Oracle).
What I do in my application at every startup:
SQLite extensions
The above makefile also shows how to compile the extension-functions.c.
This file provides functions otherwise not known to most relational databases (from the source):
Math: acos, asin, atan, atn2, atan2, acosh, asinh, atanh, difference,
degrees, radians, cos, sin, tan, cot, cosh, sinh, tanh, coth, exp,
log, log10, power, sign, sqrt, square, ceil, floor, pi.
String: replicate, charindex, leftstr, rightstr, ltrim, rtrim, trim,
replace, reverse, proper, padl, padr, padc, strfilter.
Aggregate: stdev, variance, mode, median, lower_quartile,
upper_quartile.
Conclusion
SQLite is a neat database system that provides much more than simple configuration files. It is almost maintenance-free (besides the index issue).
SQLite is a nice alternative, especially because it supports standard SQL and beyond. However, there are a number of things to keep in mind when running it on AFS, because AFS has no support for byte-range locks currently. This means that SQLite needs to be compiled in such a way that file locks (flock) are used:
Scary (and wrong) error message
When SQLite was compiled as shown, it has the nasty habit of issuing the error "I/O error" instead of "Database locked". If you are data-sensitive like me, this error may scare you somewhat, but my tests so far have shown that it is just the wrong text being issued.
Maintenance tasks
Like any database, SQLite needs a bit of maintenance (of course, considerable less than, say, Oracle).
What I do in my application at every startup:
- Issue PRAGMA integrity_check;
- Rebuild of indexes
SQLite extensions
The above makefile also shows how to compile the extension-functions.c.
This file provides functions otherwise not known to most relational databases (from the source):
Math: acos, asin, atan, atn2, atan2, acosh, asinh, atanh, difference,
degrees, radians, cos, sin, tan, cot, cosh, sinh, tanh, coth, exp,
log, log10, power, sign, sqrt, square, ceil, floor, pi.
String: replicate, charindex, leftstr, rightstr, ltrim, rtrim, trim,
replace, reverse, proper, padl, padr, padc, strfilter.
Aggregate: stdev, variance, mode, median, lower_quartile,
upper_quartile.
Conclusion
SQLite is a neat database system that provides much more than simple configuration files. It is almost maintenance-free (besides the index issue).
Abonnieren
Posts (Atom)