Report 1 (29/05/2009)

i start to wrote code .... my first time using svn (cool!)

i'll try to describe it here ...

what is done :

  • code to use ossim TCP capabilities to set a position and a point of view based on (lon, lat, altitude, roll, pitch, gain) (finished)
  • code for reading the gps data from dgps and display the nmeadata in the gui (include a map view using qtwebkit), it will use a fixed position (gps) and a modificable view setting (roll,pitch,gain) (finished)
  • code to change the position using a joystic (needs some implementation yet, but is ready for test)

so the position message can be sended using gui, gps, joystick

  • code to read the grass environment and retrieve a list for vector, raster and regions in the running mapset so it is possible to syncronize the posiotion in ossimplanet on the center of the active grass region or change the region to a speciphic layer or saved region
  • code to export grass elevation data to ossimplanet (g.ossim) the code is usable from the pyqt gui or directly from grass (finished)
  • code to read vector layer in grass and export it to kml (it is to have a custom kml settings, like color, label etc...) (needs testing, not finished)

what to do during the next week :

  • finish the code i described first
  • work on a table widjet (it will contain the avayable layer in the mapset and a checkbox for each layer i'll try to realize a "query system" connected to the gui )
  • reorganize the code in a clean way, ranaming function give them a better position in the code and create comment

known problems that can block me :

using the gdal-ossim plug-in we can read grass raster layer but there are problems to reneder images with more than 255 entries in the colortable.

i had a chat with FrankW where we discuss a bit the problem, i stored the irc log here :

http://trac.osgeo.org/ossim/attachment/wiki/GdalOssimPlugin/frankw_irclog.txt

tring to summarize it :

the code needs to be modified to handle three cases - 8bit, 16bit and 32bit integers and to error out gracefully if it isn't one of those cases... ... and "the s[sample] value it fetched from the input buffer this would need to be altered to fetch it based on the type of the buffer." in function loadIndexTo3BandTile

what i learn .. :

theSingleBandTile ---> point to a byte array (that isn't every true) theGdalBuffer.resize(theSingleBandTile->getSizePerBandInBytes()*2); ---> the band is readed correctly but is is "casted" to 8bit

i think gdal-grass should read correctly the grass data, so maybe the problem is in the colortable rendering in the GDAL OSSIM driver.

i'm tring to documenting myself reading :

http://www.gdal.org/gdal_datamodel.html

and :

ossimGdalTileSource::loadIndexTo3BandTile()

... seems it accepts only raster files with 3band or with indexcolor , need i a function to port in rgb mode a grass color table ?

i'm reading the grass colortable structure to learn more

any suggestion, lines of code, examples ... that can help me to know how to work on the gdal-ossim code .. can make me happy ... i know it is not a simple task.

Report 2

Hi All,

apologize me for the gap time :-/

the "duplicate grass installation" gived me some problems. Fixed the gdal-grass driver problems (thanks to William!!!) when multiple grass installation are finded now the problem come up with subprocess when i use the grass.py function

the error is a bit weird beacouse it sometimes works and sometimes get me a subprocess error

this only on Osx ... on linux all goes fine.

... so : hard solution, i erased an exrternal hd and installed osx from scratch with only one grass version(7) i haven't finished to reinstall all the needed SW

back to coding ...

going ahed with my coding ... what i do this week :

  • worked a lot to have a better gui. to have a more usable app. i switched from Qwidjet() to Qmainwindow() so now i'm able to use more widjet like menubar etc... (i know this are cosmetics things ;-)
  • worked on the kml export, not uploaded yet into the svn i have kml export working for point line and polygon, but i haven't yet it working on polygon that has inner+outher boundaries. it use py-gdal to have acces to the layer feature

the export parameters are :

colors (line,label,polygon) alpha-chanell(colors) line width altitude mode icons

label name and height can be setted from a field attribute

(studing the kml standard)

i'm including the layer attributes in the "kml data description", but my plain is to insert , in the kml attribute data, the results of v.what + r.what (for points and/or polygon's centroid)

for line i think is not usefull .. maybe leght and layer attributes can be good as information.

the layers to be queried are the layer in the active mapset (in the gui i'm adding a tree with layer's names, each layer will be checkable so all the checked layer will be passed to the query)

i need to add yet the capabilites to create png file for raster legend so we can the kml export to create "kml screen overlay" i think to use the png monitor in grass to produce the image or other solution .. i need to investigate

  • wrotin build documentation about my linux environment.

starting from a linux live cd distro (sidux) i done an "how to install" (apt-get & configure notes) for all the sw i'm using so i create a virtualcd based on virtualbox i can distribuite to every one want help me to test the project (the project has immense options of development so suggestions on which feature is to prefer to an other one

or you have a feature that is possible to include in it and and i haven't tinked yet)

  • On the next week the OssimDev? Team will have a meeting, so i'm preparing a report with case-test to face the ossm-gdal-grass raster rendering.

Report 3

Little notes :

Restored my OS,

for grass on osx i'm using version 6.4 (the 7 can works, but some time the build fais, so to have a more stable development i'm switching to 6,4 binary version, so it is more easy for osx user to test the code)

on linux i'using grass7 (there are difference in the module import for grass, so i'll use "try: except" to get the code running for grss 6.4 and 7)

Coded :

fixed the polygons exporte to kml so now hole in polygons hare andled firex some gui behavioure .. a window too much big, so i done a recode of the gui code

  • preparing a different web-map widjet, based on ka-map2 this can give some enanchement like :
    • ability to crteate a mapfile on the fly, generated reading the grass mapset layers
    • better refresh of gps signal
  • done a report about the grass-raster rendering, this tasks will be faced the next week, i have exam on 16 june so the incoming week my Soc works will be slowly (i hope all goes well) then i'm planning to go to bolsena meeting where i'll spend a full dept week to code.

here some screenshoot of the gui (yet prototipe) :

http://www.geofemengineering.it/data/view.png http://www.geofemengineering.it/data/data.png http://www.geofemengineering.it/data/gps.png

for who is intersted in testing, debug :

  • notes about the installation of the needed software can be etracted from :

http://wiki.osgeo.org/wiki/GFOSS.it_Live_DVD_Install

done a virtual machine with needed sw, but my ftp reject it :-( so i don't know where to upload it (this is for who is intersted in testing purpose, but has problems / or do not want touch his system)

Report 4

Hi All,

here the 4-th report for my project :

In the last week, after some coding i can see that he main-app file was too much long that is no good beacouse the code is not easy readable.

doing some test, i can see the threaded class "joystick and gps tools" consume a lot of cpu-resource

i decided to do a complete revision on the code :

  • extracted some function and class from the main file and store it in separate files (the code results more readable, and each tools can be easy re-used out-side the main app)
  • done a complete revision on the trheaded class, now the trhead are colled only when they really needs i also added in the joystick code a line used in pygame to reduce cpu usage when possible.

The results code is more fast and readable.

In the last week i also worked on :

  • a query tool to ask information on grass layer (both raster and vector) it runs r.what + v.what on a list of selectable layers avaiable in the active grass-mapset.
  • initial test about the grass code to produce "legend images" for raster layers this is needed to produce kml screen overlay
  • create a blog page for the project to describe the project

http://www.geofemengineering.it/sasha/sasha/Home.html

what to do the next week :

  • separate each tool in separate files produce some (minor) code issue, i need to learn how to send a message from one widget to an other one (e.g. create connections bettween different tools) if some one has pyqt knowledge i have some questions for him ;-)

  • rework the web-map based tool using kamap2 (it will consists in a web-gis based on a mapfile produced on the fly, it read the layer to render from a list of grass layer, so i'm coding an interface to produce it)

  • i'll be in Bolsena for the osgeo hacking event i'll try to receive feedback, suggestion for a full coding-week

Report 5

Week 5 (June 26, 2009) 1.What did I do this week:

-Fixed the comunication between the main app and the widget window, so now i’m able to send/receive message trhought the different windows.

-Inizial coding about the web-map based on ka-map and a system to auto generate mapfile reading data from grass mapset.

-Working on r.external to see how to integrate imagery data ued by ossim (large mosaics, single band files, merged rgb images etc..) to test the ability of grass to load externbal data.

-Bug fixing in the gps thread, joystick code.

-inital write for a configuration setting dedicated to external device (joystick, joypad or other device)

-working on arduino, to send signals from external device to the application.

2.What do I plan on doing next week:

I’m reading the source code of Ossim-Gdal plug-in, in the next week i‘ll continue to read it and i hope to be able to detect the part of code that need modification. Ossim-Gdal plug-in is based on complex code, i’ll need a mix of hard study+ great lucky ... and try to figure it out ;-)

3.Am I blocked on anything: x

Report 6

Week 6 (July 3, 2009) 1.What did I do this week:

-Fixed the Grass Raster Rendering in Ossim-Gdal plug-in, now we can load grass raster data type (Byte, Uint16, Float32, Float64) in imagelinker and Ossimplanet.

The rendering works great, all the ossim function like “img2rr, create_histo, mosaic, image_info ...” now works on grass data too.

-Finished to wrote a template mapfile to read gps data in real time (gps data stored on postgis) ... i need yet to implement an autogenerated mapfile based on selected

grass layers.

-Create a python dictionary from the geonames cities database (a dictionary for

each region) target is to have a combobox with listed region once one region is selected in an other combobox we’ll have cities names to zoom to.

-Continue to sperimenting the use of r.external (using vrt data) to read in grass imagery data generated by ossim.

2.What do I plan on doing next week:

-Study/Learning?/experiment with the broadcast/listner Ossimplanet’s capabilities.

(target is to load raster data in ossim using tcp connection).

-Learn more on grass command like : r.cost, r.los, v.net.path, v.net.salesman.

the target is to generate capture nodes using the gui/joystick pass them to grass generate visibility-map/route/path and send it out to planet.

3.Am I blocked on anything: x

Report 7

Week 7 (July 10, 2009) 1.What did I do this week:

-Created a tool to apply grass/Ossim/others Unix executable on grass data “image_info, img2rr, gdal_translate(VRT), r.info, r.report, ...” the commands are applied on VRT data, so to avoid to have histogram and preview files in the cellhd directory.

-Work not yet finished : autogenerated mapfile based on selected grass layers.

-Ctreate a tool to use geonames data, the tool is based on a spatialite database with geonames data. Using pysqlite the app reads the db.sqlite to populate 2 combobox the first one is to select the country zone the second one to select a place, then click on send an planet will zoom to the selected position.

Working on this feature i wrote a some function to use spatialite from python, like : init a spatialitedb, populate a splt.db from a postgresql table, create dictionary to store query results etc ...

-Bug fixing ... the last month i worked a lot .... but only on OSX, so now i’m running the app from my Linux box and adjust the code, generalizing some line when i used hardcoded path and adding some if statment to check the platform type (Darwin / Linux)

  • Initial port to python for the shell script “g.ossim” so it will run under grass7.

This work will be completed by adding an other python script that will use gdal-python instead of grass so we’ll can apply the same action outside of grass (needed by the future qgis implementation)

2.What do I plan on doing next week:

-Finish to implement the tool i’ve described, continue bug fixing

-Learned about r.cost, r.los, v.net.path, v.net.salesman , i’ll explore the new spatilite routing abilities too, maybe will be possible to implement a route generator to have kml as output

-I need to add Qdialog message when the user make illegal action, (just a worning message to suggest )

3.Am I blocked on anything:

-Tring to learn the ossim tcp inteface to send data using tcp connection. An Ossimplanet session (used as broadcast) is able to send both data and navigation to an other Ossimplanet session (listner).

... i created a sniffer during a connction, to read and capture the ossimplanet message to load data (for navigation i have no problems) but tring to send the camptured xml using python to load data the message seems don’works as aspected.

Report 8

Week 8 (July 18, 2009) 1.What did I do this week:

•Implemented a Grass shell in the pyqt gui, (it is a standard unix shell + grass environment). The history is readed directly from the grass history file deleting the duplicated lines and sorting it alfabetically (it is accessible using a combo-box). Some people suggest me to use pyredline directly i've sperimented it but i'm more familiar with python list and combo box approach.

•Working to have a better rendering from the grass command that print text-infos about selected layers.

•Rewrite the python's tool to transfer data from postgresql to spatialite,i re-done a more-informational spatialite-db based on geonames (i included other infos,not only : name , lon, lat values). I'm Planning to add different spatialite-db (examples : one for geonames, one for gps recorded data, an other one for saved points of interest + tool to store points dircty in spatialite) this work will be integrated by routing abilities (using grass command, i'm following with interest the new great Gsoc tool about routing) .

•Bug fixing ... continue some linux/osx test, i find that ubuntu 8.10 has a bug in the sdl libraries, this give problems to detetc the "joystick-hat" using pygame. Googling and coding seems i find a walkaround using python-gobject as an alternative way to support joystick instead to use pygame (only for ubuntu8.10). The code to detect hardware is ready but i need to reimplement the joystick code from pygame to, but this is a minor issue, i'll do it it only if really needed ubuntu8.10 support. (on more recent distro "sidux" all works fine with pygame as on osx, i' also tried a bit ... on windows platform,some adjustment i get the gui loaded and the position message working, but too many dependencies to satysfy (gpsd, pygame...)so i aborted my tests )

•Added a Qdialog to show infos about illegal gui usage, and to manage exceptions. (it is a simply window to show a message if we done some not handled action .. like : pan without selecting a pan-mode, connect gps withot existing connection etc...) for now i implemented the gui system but i need to see all the possible exception and change the message according to it.

1.What do I plan on doing next week:

•Continue bug fixing, gui cosmetics.

•Recompile ossim using the last svn (thanks to the Dev team some new cool enanchemets are coming :-) ), see if it is possible to fighting against the code to send message trough tcp, i will start to read source code, i hope to be able to learn about the problem that block me to send data-message.

1.Am I blocked on anything:

•Continue to read and try to learn the ossim tcp inteface (target: send data using tcp connection).

Report 9

Week 10 (August 1, 2009)

What did I do this week:

Bugfixing, gui cosmetics, message-dialogs to manage exception.

Implemented a new function+relative gui to place 3d model (collada .dae)

inside a kml.

Working on a function to rotate/scale/traslate a vector object, it will have

as additional targhet the ability to display projected coordinates (not only geographical)

I get working ossimplanet tcp data messaging using python soket and

i’implemented a relative gui tool to send/remove grass raster layer to Ossimplandet.

What do I plan on doing next week:

Continue bug fixing, gui cosmetics, cleaning the code.

Investigate if possible to work on a routing function .

finish the module to rotate/scale/traslate a vector object.

Am I blocked on anything:

Nothing block me :-)

Report 10

this week was a cool and bad week at same time ...

cool :

  • i finally get the base code (not all the tools yet) working in qgis as a python plug-in
  • added UTM coordinates + zone in the display based on different ellipsoids [1]
  • working on a function to move the planet "smooth and slow" bettween 2 point (simply it generate intermediate points along a geodetic lines to connect 2 points) this work is not finished yet but it is promising [2]
  • finished the tool to reproject, traslate, rotate a vector (i need to finish the "scale" function) for now it works on shp file but it can work on all the ogr format. the reprojection tool is based on 2 set of gcp to solve a last square system (only planimetry) (you can choose between affine or conforme transformation)

day : http://img34.imageshack.us/img34/5783/immagine7l.png

what i'll do the next week :

  • i'll work hard on the qgis side to go ahead about the gsoc code "porting"
  • work on the geodetic "smooth-slow" moving bettween 2 positions
  • working on how to customize the grass vector rendering (point size, line width, colors...)

bad things :

this week i broken the internal disk of my laptop .. "lucky" it is readable but not writable .. so i had to buy a new one and reinstall *all* my needed sw on it (i know it is a little OT

.. but this issue braked me)

best regards and happy summer!

Massimo.

i re-used LatLongUTMconversion and pyproy :

[1] http://code.google.com/p/pyproj/ [2] http://pygps.org/#LatLongUTMconversion

## ##

End of GSOC Experience, details about the developed code are stored on my blog page, the development is still active ;-)

http://web.me.com/epiesasha/PlanetSasha/Project.html

Last modified 11 years ago Last modified on Jul 8, 2010, 9:26:48 PM