GeoTools

OSGeo

Monday, September 26, 2011

GeoTools Code Visualisation

Managed to create a small movie showing recent commits to the GeoTools repository:

Here is an attempt at an embedded iframe; however this is not showing up on planet.osgeo.org; so try the above link...


Visualisation was created with gource which installed quite nicely on a mac using "brew install gource". The result is an interactive visualisation you can use to visually explore what developers have been up to.

The second step was to make a movie using "ffmpeg" where I had a bit of install trouble (resolved here).

Here is what that looked like on the command line:

gource -title GeoTools -1280x720 --auto-skip-seconds 1 --background 333333 --font-colour EDEDED --seconds-per-day 0.1 -o geotools.ppm
ffmpeg -y -b 10000K -r 60 -f image2pipe -vcodec ppm -i geotools.ppm -vcodec libx264 -vpre slow -threads 0 -bf 0 geotools.x264.mp4

Wednesday, September 14, 2011

Help the swing module to speak your language


We are adding support for localized text strings to the gt-swing module to make it easier for you to provide local versions of your applications.

A new LocaleUtils class has been added so that client code doesn't need to worry about the usual Java i18n boiler plate code for loading and caching ResourceBundles etc. Using this class, an application can set a preferred locale at the beginning of a session, prior to constructing any GUI components that will use localized text strings), like this:
LocaleUtils.setLocale(Locale.ITALIAN);

Then, localized text strings are retrieved like this:
String localToolTip = LocaleUtils.getValue("CursorTool", "ZoomInTooltip");

The text strings are stored in properties files as per the usual Java i18n conventions. For the swing module, the properties files are in the org.geotools.swing.locale package and group strings according to component category: e.g. "CursorTool". Adding support for a new language or language variant simply involves adding the appropriate locale to the properties files. LocaleUtils provides support for locales that are only defined for a subset of properties files by allowing the application to specify a list of locales in preference order. For example:
LocaleUtils.setLocale( Arrays.asList( firstPrefLocale, secondPrefLocale, fallbackLocale ) );

How you can help

We need volunteers to help add and review translations. To begin with, we are just adding support for the text strings used within the gt-swing module itself plus a small selection of generally useful strings. Next, we hope to extend the LocaleUtils class so that applications can register their own properties files.

If you would like to help please contact us via the GeoTools User list.