Monday, October 13, 2008

How to get GRASS related preferences into your code

What to do when you need the mapset that is currently set for doing calculations or even the path to the GRASS GISBASE?

Go and buy some at your preferred store:

ScopedPreferenceStore preferences = (ScopedPreferenceStore) ConsoleEditorPlugin
.getDefault().getPreferenceStore();

String mapsetString = preferences.getString(PreferencesInitializer.CONSOLE_ARGV_MAPSET);

String gisbaseString = preferences
.getString(PreferencesInitializer.CONSOLE_ARGV_GISBASE);

Post a Comment