After several days of hard studying and hacking, I could discover how to use SPATIALITE from a Java class or less generically from a Java application.
I propose you're reading a simple example for explaining how could I work with sqlite and spatialite from a sample java Class. I add also all the dependencies and other stuffs necessary for using it.
First of all you need to take provide yourself with the libraries you're going to use. They are:
1 - SQLiteJDBC : that's the java driver for using sqlite and its database files
It needs having installed on your system a Sun Java 5 compatible compiler.
You can install it parallel to the usual open-jdk, usually already present on your machine.
Check that's not already on your machine for any reason with:
You have to follow some easy steps:
sudo apt-get install sun-java6-jdk
sudo update-alternatives --config java and chose the sun-java one
Set two values into your
~/.bash_profile or your
~/.bashrc (according to your system you could find any of them) :
export JAVA_HOME=<path to the folder of your jdk>(ex. )
export PATH=$PATH:<path to the bin folder within your jdk's dir>(ex. )
It's time to get into this new adventure and sailing towards new lands! I've been accepted as student for the Google Summer of Code 2010, and with me the IOSA team.
The project is really interesting (giving support to SqLite and SpatiaLite) and gvSig is related, not less then other gis, to archaeological researches.
It's quite scaring thinking about the huge quantity of work it needs for fullfilling my task and at the same time it's really funny and amazing realising that together with the sweat of coding we'll get for sure a lot of fun!
The gvSig team that helps me with the project looks like being very pleasant and nice.
For mantaining some trace of the steps I'm going to follow and keeping a rough documentation of the most interesting links and approaches and codes I find all around this period of work I've decided to write some posts on Iosa.it, not to forget this fantastic adventure I'm going to begin.
We're very pleased to announce that the new release of Total Open Station is almost ready. Within a few days we're going to release the 0.2 version of the application.
It will be available for windows, linux and (a little later) apple systems.
There will be a windows exe, already available and packaged.
It has been quite interesting packaging it.
We have used pyInstaller ( http://www.pyinstaller.org/ ) .
When the cmd is open ( on a win sys ofcourse ) and we've reached pyinstaller folder, the comands we've typed are just:
python Makespec.py --tk --noconsole --icon="..\tops.ico" ..\totalopenstation\scripts\totalopenstation-gui.py
python Build.py totalopenstation-gui\totalopenstation-gui.spec
Cool stuff pyinstaller: easy and working!
Iosa's team is developing (already quoted some posts ago) the software called Total Open Station, for surveying and data recording from total stations. In the May 2008's Italian edition of the IT-magazine "PCProfessionale" you can find a VERY little box speaking about TOPS! It says that this application should be useful not just for archaeologists but even for other people using total stations as any kind of people involved in surveying. It's at the same time a satisfaction for the developers and a good feedback for going on with the development and the conception of new parts of the software. Thanks "PCProfessionale".
One of the first results of the collaboration between Iosa's team and Oxford Archaeology is available on https://launchpad.net/mpm . This is the test version of a tool, thought to manage photos and pictures metadata. It's based on the very powerful Exiftool library ( http://www.sno.phy.queensu.ca/~phil/exiftool/ ). The whole program is written using some Perl modules and is conceived as an archaeological oriented metadata manager.
It provides some fields you can load, edit and save among the metadata of the photo. You have a preview tool and the possibility of exporting (appending or creating a new document) the data entered in an *.xls file.
It has been also tested a new function for recording the geospatial data into the GPS tag of the Exif file. This part of the program has been adapted for using the data coming for the Openmoko's gps.
This is just the first completely functioning version of the program, actually available just first Linux based systems.
On the 7th of May 2008, there will be a meeting with Richard
Stallman, one of the Free Software's main "philosophers", in Savona's Campus of the University of Genova(Italy).
Richard Stallman is going to discuss about "Copyright vs Community in the Age of Computer Networks" .
It would be a pity to loose the opportunity to meet one of the gurus that has founded GNU Linux and the Free Software Foundation.
More informations writing here : email@example.com .
Thus let's go guys!!!!