Do not drop spatial geometry on close
use OSGi function services
move spatial functions