wiki:WeekReport

Version 4 (modified by epifanio, 15 years ago) ( diff )

--

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

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

Note: See TracWiki for help on using the wiki.