PlanetSasha? : OssimPlanet integration in Grass and Qgis

Massimo Di Stefano's Google Summer of Code 2009 project, mentored by Mark Lucas

Aim of the project

Develop a plug-in for the ossimPlanet application for interface with other Open Source G.I.S software such as Grass and Qgis. This will allow export of elevation data from grass to OssimPlanet and add the ability to load Grass data (both raster and vector) in Ossim. The end result will be to synchronize the grass maps canvas extent with the Ossimplanet scene.

State of the art


Using the ossimplanet tcp listner and a python socket i'm configuring a gui to modify position and view parameters (roll, pitch ,heading) in ossimplanet. I'm planning to add different "position" type :

1 - Grass : read the grass region, extract the center in lon-lat wgs84 and sen it to ossimplanet,

the region center will be the start point for the pan-action. i'm adding the capabilities to read data inside the current grass mapset and set the region according to : a) raster file b) vector file c) saved region

2 - Gps : read the position from a connected gps serial device, and use the gui to modify the view parameters.

in these case the gps (NMEA) data will be saved in a postgis layer, the NMEA data will be displaied in a specific gui tab (in the gui will be added the ability to save a kml using a template (maybe html template using pyqt-webkit object so in addition will be possible to add an openlayer mapdisplay to display and interrogate the saved waypoints)

3 - Static Positioning : zoom to a point with known coordinates :

a) manually insert lon-lat values and zoom to it b) zoom to a specific place (i'm storing geonames cities data in a db) in a combobox i'll add a list with cities to zoom to.

4 - Joystick : The code will use pygame, it is an alternative pan-zooming mode, the joystick buttons will be cofigured

to make action like save point in db or make query to loaded data. For now the relative code will be based on a simple "increase/decrease - latitude/longitude values" it will not handle rotation like a flight simulator. I'm tring to develop code based on quathernion math, the functions to implement are relative simple ... but its usage is no easy beacouse it is not so intuitive

Data managing :

To load data for now i've no clue if it will be possible to load data dinamically (using tcp or modifing Ossimplanet source code), so i'm studing a way to add layers ... the more easy way seems to be : " generate a ossim.session " i can generate it using python to create a list of layers to be "added" in the ossimplanet scene.

Using to read avaiable layer (image, elevation, vector) from the mapset, put a list for each type in a relative combobox, For each type will be possible to run on the relative layer the ossim executable application, img2rr to make preview, cmm, orthoigen to produce elevation data, ossim_height to retrieve msl data... The ossim executable will run on grass data or external files.

For ogr (grass too) vectors i'll add a dialog to customize vector rendering. colors, line's width, point's size etc. (rasterize vecors will be an option, i'll add it too)

Planned Timeline

I begin to wrote the code for the project, actually i'm giving the firts attention to the positioning capabilities in ossimplanet. then i'll work to improve the grass bindings (load data)

week 1: Organize the algorithm design, define the needed classes to develop the code's functionality, design the GUI interface.

week 2: Implement the Grass module, first the data export (elevation), then implement the synchronism between Grass-map-canvas-extent (grass-region) and OssimPlanet.

week 3: Implement a GPS parser (i'll utilize "gpsd" ) to send the position messages to OssimPlanet (with postgis data-save capabilities) & Implement the joystick code using Pygame.

weeks 4 - 5 - 6 - 7 : Work on OssimPlanet side to make the ability to load data from command line and/or using TCP connection.

weeks 8-9: Work on the gui code to adapt new code that comes up from the previouse week progress

weeks 10-11: Port the gui implemented for grass, inside Qgis as a PyQt? python plug-in and/or a Grass-Qgis module.

week 12: Fix bugs, write documentation, packaging.

Source Code

weekly report


Blog Page

Known Issue

Gdal - Ossim plug-in

i'm annoting an irc discussion about gdal - grass - ossim here :


page - draft - i need to terminate it yet

Last modified 11 years ago Last modified on Jan 20, 2010, 10:44:20 PM