Monday, 7 October 2013

OpenJUMP: adding a vector layer with a customized db

Hi all,
today I recorder a fast videotutorial regarding the GIS OpenJUMP (which is one of the Geographic software integrated in ArcheOS).
Normally, when you add a new vector layer in your project, you get a new empty level, without any database schema, so that you can start to draw your feature, but, if you want to add some info, you have to manually describe your db schema, like in the video below:




Of course, if you have to draw many different layers with a common database schema (like always happen in a normal archelogical GIS), this operation can be time-consuming (and boring). For this reason in the videotutorial below I try to show how to write a short script which automatically add in OpenJUMP a new vector layer with a customized database schema:



Since I fear the quality of the video is too poor in Youtube, I prepared an image in which you can see better the source code of the script:


The code of the script
To work correctly, the script has to be placed in your OpenJUMP folder, in /lib/ext/BeanTools/ and, as you see in the video, you have to refresh the menu in OpenJUMP (Customize --> BeanTools --> RefreshScriptMenu) to find it (in ArccheOS Caesar you will find the script already in the menu. Just modify the code according to your needs).
Like always I added the tutorial in our ArcheOS wiki (DADP project), in order to go on in composing a free documentation system for Digital Archaeology: 

I also uploaded the code of the script into a specific github repository, so that, if you want, you can contribute in its development. We can use the comment space of this post for the discussion about the schema and about its possible modifications (or you can simply download the script and modify it in order to fulfill your specific needs).

I hope it was useful, have a nice day!

BlogItalia - La directory italiana dei blog Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.