Tuesday, March 17, 2009

JGrass loves Worldwind

Lately I had the need to look a bit more deep into Nasa World Wind.

With the help of the amazing examples of Patrick Murris I have been able to connect a map from a GRASS workspace to be automatically visualised and tiled for WW.

The funky thing is that while tiled, a cache is created, so it is slow only the first time.



and the same with transparency:




I am still looking for a way to substitute the elevation model of WW with a custom one on the fly.

For now this is all about prototyping and documenting, but it looks great.
Would be good to have it embeded in JGrass/uDig as its default 3D viewer?
Who knows... :)

Sunday, March 8, 2009

Variable names in console

In the past users reported problems with scripts, in which maps were not found. If you have numbers in the first part of your map name, read this, it might help you out.

The console engine tokenizes every pieces of script code that enters and parses and analyses it, before generating the needed code to be executed.

The words that can be used as a variable name, are tested to match the following regular expression:
^[$][a-zA-Z_]+[a-zA-Z0-9_]?+$

This probably won't help most of the users at that point (it will developers), but it solves the above cited problem, since it states that in the first "piece" of variable name there can't be numbers:

So by changing for example something like
      $d2o3d_map
to
      $dtwoothreed_map
the thing might work properly.

Tuesday, March 3, 2009

JGrass and Jiffle, what a mapcalc

Lately I have been quite in contact with Micheal Bedward, the author of the Jiffle project.

I played around a bit with it and I integrated it in the JGrass development trunk version to substitute the current mapcalc.

I will not show much here, since I created a page on the Jiffle wiki that shows some tests done so far. Just a little image to attract your attention :)




I like both Micheal and Jiffle, they are really amazing :)

Monday, March 2, 2009

Finally I solved the problem with the BSoD on my dell


It makes one feel good, you should try... it makes one feel as if he would have control over the machine. Which with windows doesn't happen quite often...

Sunday, March 1, 2009

Expanding the console language - part III

It is now possible to directly access database with groovy's very powerful features.

Few steps are required:
1) add the database definition to the script settings

# REMOTEDBURL = postgresql:host:5432:database:user:password

2) request the groovy SQL connection

def sql = getDbConnection()

3) execute the query and do something with the result

sql.eachRow(the_query){
// the closure
}


That would all look like: