Changes between Version 7 and Version 8 of NERCPortals


Ignore:
Timestamp:
08/02/08 11:26:38 (11 years ago)
Author:
mkochan
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NERCPortals

    v7 v8  
    7676   and is only used by {{{GridSeriesConvertor}}}. 
    7777 
    78 = StationConvertor = 
     78== The module {{{StationConvertor.py}}} == 
    7979 
    8080Example run is contained in {{{kml/csml2kml/python/csml2kml/tests/testStationConvertor.py}}}. 
     
    111111Using the {{{#ID#}}} value will in turn be substituted by the individual feature's ID. 
    112112 
    113 When the config-file tag {{{UseRegions}}} is set to "yes", the convertor is capable of generating KML 
    114 with a very large number of stations, possibly tens of thousands. If all stations were visible in Google Earth at the same time, the rendering would be very slow. Therefore, the stations are organised into a hierarchical structure of regions using the kml:Folder and kml:Region tags (link) that causes stations to be rendered only for closer zooms onto the ground. In code, this is solved using splitting each geographical region (a rectangle) into 4 smaller regions, and continuing until a small number of stations (10) is present in that region. In KML, the stations are saved as kml:Placemark elements in a hierarchy of kml:Folder elements.  
     113=== Support for KML regions === 
     114 
     115If all stations were visible in Google Earth at the same time, the rendering would be very slow. 
     116It is therefore possible in Google Earth to organise stations (represented by kml:Placemark elements) into a hierarchical structure of regions using the kml:Folder and kml:Region tags that causes stations to be rendered only for closer zooms onto the ground (link). 
     117 
     118Therefore, when the config-file tag {{{UseRegions}}} is set to "yes", the convertor will generate a KML document which will contain all stations contained in a single folder, with hierarchy of regions inside. 
     119 
     120Codewise, the process performed two steps:  
     121 - First, 2D globe space gets split into 4 smaller regions, and this is repeated recursively, until a small number of stations (10) are present in the current (low-level) region. Thus a so-called quad-tree is constructed (quad = each node has 4 children) which contains the hierarchy, with actual stations as leaves. The quad-tree functionality is contained in the module {{{QuadTree.py}}}. Thus, a {{{QuadTree.QuadTree}}} object is constructed. 
     122 - Second, the {{{QuadTree}}} object is "translated" into a {{{KMLDocument}}} object.