Sunday, June 15, 2008

How to setup the Udig / JGrass / BeeGIS development environment while drinking a beer

THERE IS A BUG IN THE PLUGIN THAT MAKES THINGS OF THE AUTOMATIC TARGET PLATFORM NOT WORKING. PLEASE WAIT UNTIL THIS IS SOLVED> I WILL UPDATE HERE.

____________

Well, I wanted to start this like: "Installing your GIS development environment has never been that easy!", but since every time I start like that every time I get burried by bugs and problems, this time I will try to keep my feet on the grund. :)

Alright, so I wrote my first plugin for the eclipse IDE. It is a plugin that automatically installs everything needed to do Udig-sdk, JGrass or BeeGIS development. Also it tries to import projects and configure the target platform, in order to really help beginning rcp developers to start with GIS development.

Here the step-by-step guide to do so (this assumes that you downloaded the eclipse IDE suitable for plugin development):

step 1) connect to the update site and install the plugin that will take care of all this

Go under Help->Software updates->Find and install



select the second: search for new features to install



in the next tab select new remote site and insert as name: JGrass Devel Setup
and as URL: http://www.hydrologisprojects.com/jgrass-devel-setup-update



after pushing the finish button, eclipse will contact the update site and present the plugin to install:




Select it, push next, accept the license agreement, push next once more and in the last tab push the finish button.

Eclipse will download the plugin, prompt for installing verification and after ok, it will also prompt you to restart eclipse.
Let's answer everything asked with ok, yes or whatever positive answer.

Once restarted we go in Window->Show View->Other...



and we will get the list of available views:



Select the JGrass DevelEnv Setup View and you will get a view window with some choices:



At that point you have several choices:
  • install the udig sdk
  • install the JGrass extras
  • install the svn code from the JGrass repository
  • install the svn code from the BeeGIS repository
I will leave them all checked for this example, which will lead to install everything.


step 2) Installation: Push the button and open the beer!

If everything went well, what should happen now is:

- download of the udig sdk (this will take a while, about 100MB to be transfered)



- extraction of the udig sdk into your workspace





- download of the JGrass sdk extras and its extraction into the udig sdk



- checkout of the JGrass svn code and import of the checked out projects into eclipse workspace



- checkout of the BeeGIS svn code and import of the checked out projects into eclipse workspace



Be sure it finished (in my case it took 14 minutes to download and checkout everything)




step 3) setting the target platform

You will probably notice that all the imported projects have compilation problems. This is ok, since they do not yet have the proper target platform set to compile against. That is what we will do in the next and last step.

Go under the eclipse preferences and there select: Plug-in Development->Target Platform



You will note in the lower part a section dedicated to Pre-defined Targets. The plugin adds a new pre-defined target, which points to the newly downloaded and prepared udig-sdk. Select the entry JGrass/Udig Target Platform and push the load target button. You will note that now some net.refractions.udig.* plugins are listed. If so, you did it right.
Make sure that all the plugins are selected, if they are not, select them all.

Before pushing apply you see the compilation problems:



After pushing apply the errors have gone:




You are now ready to start development!
Already finished the beer?

Enjoy and please let me know any issue. This is the first version of the plugin, so there could be issues for example on different platforms. Right now I tried it only on Macosx to make this howto.


PS: if you are curious about the versions of which software it is using and where downloading from, have a look at the configuration file it uses (it connects to that site): http://www.hydrologisprojects.com/testfiles/config.properties

13 comments:

Holtkamp said...

Is this plugin still under support?

The line: "THERE IS A BUG IN THE PLUGIN THAT MAKES THINGS OF THE AUTOMATIC TARGET PLATFORM NOT WORKING. PLEASE WAIT UNTIL THIS IS SOLVED> I WILL UPDATE HERE." seems to indicate that it is not very wise to use this plugin. However, it does makes life a lot more easier! I haven't been able to set up a proper working uDig SDK yet and was hoping this plugin could do the trick for me ;).

With kind regards,

Menno

moovida said...

Hi Menno, I started this because I thought it would be usefull for others to start developing, but after a short round of feedback, nobody gave me reports about errors or similar, so I stopped it.
It works pretty well, apart of the target platform setting, which on my pc worked. So, without someone that agrees to do the beta tester, this is a difficult plugin to bring on.

I should soon have again some found for teaching. I guess at that point I could enhance a bit the plugin to work better.

රුසිරු බොතේජු said...

http://www.hydrologisprojects.com/jgrass-devel-setup-update link is not working

Javalogix said...

you can download the plugin from
http://www.4shared.com/file/133031316/71db9eb5/jgrass-devel-setup-update.html and extract it into your Eclipse directory manually.....

http://www.hydrologisprojects.com/jgrass-devel-setup-update is not working for some reason !

රුසිරු බොතේජු said...

thanks :D
Are there any good books to learn jgrass?

moovida said...

I removed the link, because the plugin was kind of unfinished and needed more work.
I was told to get some contracted work to finish it, but then it didn't happen yet. So the plugin is still not there, I am sorry.
The old plugin works with a certain older udig sdk, so you have to be aware of that.

@රුසිරු බොතේජු
We will release by one month maximum from now the JGrass manuals. For this we have contract work and so I can assure that. For now the starting point is the user documentation on the jgrass.org website.

Best regards,
Andrea

රුසිරු බොතේජු said...

ah really :( we are currently doing a project which is related to GIS, as our university 3rd year project and we three options to do that Grass, jGrass, MapServer. As our group members are good with java we thought of doing it using jGrass but the problem is we have no idea about how to use jGrass properly :(

Rusiru

Javalogix said...

will be waiting for that because im having some serious problems setting up the JGrass development environment. i followed the step by step guide and even used he plugin for that matter but there are still some dependencies im unable to remove :(

moovida said...

@රුසිරු බොතේජු
I do not understand if you need to do development or use of JGrass. If you subscribe to the users list (https://dev.fsc.bz.it/cgi-bin/mailman/listinfo/jgrass-users), I can help you to understand what you need and if I have the needed documentation.

@Javalogix
Did you try out the manual one? It is stricktly bound to udig's, which is greatly documented. Also, if you write to the mailinglist, I can help you set that up.

රුසිරු බොතේජු said...

we are gonna map some radar data to a map and we have to do some 3D modeling too can we get a 3D view using jgras

moovida said...

I am not sure what you mean by 3D modelling, but in JGrass you can't visualize 3d data. Probably a good way to do that would be nasa world wind.

Grass indeed has both the full 3D modeling environment and viewer, so probably you will have to stick with that. Java would then have to be used through JNI binding, I am afraid.

Android app developers said...

This is one of the glamorous post.I like your blog strategy.Try to get more this kind of post.

Android developers said...

I accept this absolutely is excellent information. Most of peoples will accede with you. so i would like to thanks for creating this blog.