Andy Spencer [Mon, 9 Nov 2009 13:24:54 +0000 (13:24 +0000)]
Add Shuttle Radar Topography Mission plugin and height code
For the most part, the SRTM plugin is simmilar to the BMNG plugin. The
loaders are more complicated because it generates both a bil (unsigned
short array) and a pixmap from the downloaded files.
Highmaps are in two parts when set_height_func is called with
update=TRUE, the heights of all the vertices for a given tile are
updated by calling height_func and using the returned value as the new
vertex height.
In addition to updating the vertex height immediately, the height
function is also stored in each vertex and used later during the
split-merge process.
The user_data passed with set_height_func could theoretically be used to
speed searching for the correct tile during the split-merge process, but
this is currently not done. (Each call to the srtm height function does
a search for the correct tile)
Andy Spencer [Mon, 9 Nov 2009 12:37:58 +0000 (12:37 +0000)]
Add Blue Marble Next Gen plugin and tile rendering code
Tile Splitting:
(These functions were skipped in the previous commit for GisTile)
To update a set of tiles, the plugin responsible for the tiles needs
to periodically call the update function which will split any tiles
that are below the viewers desired resolution.
Unlike the WmsInfo method, the tiles are not automatically updated
when a particular tile is requested. (In fact, requesting a particular
tile is rarely done).
Tile Rendering:
Rendering with GisTile is significantly different than with WmsInfo
and fans. This difference is easily explained with some pseudocode:
Old way:
for triangle in mesh:
for tile in find_tiles(triangle):
render(triangle, tile.texture)
New way:
for tile in tiles:
for triangle in find_triangles(tile):
render(triangle, tile.texture)
Both find_tiles and find_triangles are O(log n) operations in the
worst case, but I think using find_triangles should result in faster
code because find_triangles can quickly return a large group of tiles,
while the find_tile function typically reruns a single tile. There's
additional discussion of this in the source code.
From an implementation standpoint, the new way makes it easier to add
plugins. With the old way, the find_tiles function was invoked by a
function pointer attached to the sphere, which makes rendering
multiples layers of tiles difficult. In the new, each plugin just
calls the render_tiles function which renders a set of tiles
(recursively) on top of the sphere.
Andy Spencer [Mon, 9 Nov 2009 12:02:23 +0000 (12:02 +0000)]
Add GisTile and GisWms and update wms_test accordingly
GisTile:
* Represents a lat-lon tile
* May contain pointers to child tiles of higher resolution
GisWms:
* Contains Web Map Service support functions
GisWms and GisTile roughly translate to WmsInfo and WmsCacheNode. The main
difference being that the new versions are more independent of each other so
non-wms downloaders can be used in the future.
The other major difference is that GisTile is not transparent as WmsCacheNode
was. That is, there is no gis_tile_fetch function which automatically updates
the tiles.
Andy Spencer [Fri, 30 Oct 2009 04:58:08 +0000 (04:58 +0000)]
Reorganize BMNG and SRTM into plugins
- Create dummy plugins in src/plugins for bmng and srtm.
- Optimize Roam code:
- Fewer height and projection updates
- Cache triangle l-r midpoints and share them with children
- Also remove a lot of trailing whitespace
Andy Spencer [Wed, 2 Sep 2009 14:42:02 +0000 (14:42 +0000)]
Removing ridge plugin and moving exmaple plugin
Ridge plugin is deprecated due to libGIS. The example plugin has been
moved out of the autoconf source tree into the stand-alone examples
folder. Wms, Roam, and GPQueue headers now included in the install.
Andy Spencer [Mon, 25 May 2009 01:48:49 +0000 (01:48 +0000)]
* Fixing some async issue (w/ gthread_init)
* Consistent debug messages
* Debug levels
* Command line arguments
* Making AWeatherGui a subclass of GtkWindow