Changes between Version 9 and Version 10 of MapGuideRfc60
- Timestamp:
- 04/16/09 16:52:47 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TabularUnified MapGuideRfc60
v9 v10 61 61 The interesting task is how to feed the base colors of the map to the Image Renderer making the image. 62 62 The base colors of a map can be extracted most efficiently during map generation in MapingUtil::StylizeLayers(). 63 To do this the VectorLayerDefiniton gets an additional method called VectorLayerDefiniton::ComputeUsedColors(scaleRange). 64 At the end of the stylization this method is called and the resulting color list is stored in the runtime map object MgMap. 65 (Map->SetColorPalette(pStringColorList)) 63 To do this the VectorScaleRange gets an additional method called VectorScaleRange::GetUsedColorList(). 64 This is a computed property implemented as a singleton which creates the list upon access. Subsequent requests from other threads read the same list. 65 At the end of the stylization GetUsedColorList is called and the resulting color list is stored in the runtime map object MgMap. 66 (Map->SetColorPalette(pStringColorList)) This method sorts and uniquifies the color list upon storage. 66 67 67 The RenderingService reads the color list from the map object, sorts and uniquifies it, and converts it into a more appropriate Colortype. 68 The colors from the MdfMModel are MdfStrings and the algorithm simply collects all different strings. So in order to support expressions for those colors the list simply needs to be interpreted when read from the MgMap object. 69 70 The RenderingService reads the color list from the map object, and converts it into a list of RsColor objects. 68 71 This color palette is then passed down via the AGGRenderer to the AGGImageIO objects Save method. Here the png color quantification 69 72 algorithm is included to force the provided palette into the rendered image - this way making sure that the correct base colors survive the compression and/or color quantization. … … 72 75 == Implications == 73 76 74 No Implications are intended as this behaviour is desired by default. We just get better looking maps. The cost of extracting the colors from the in-memory representation of the XML data describing the map are presumed to be negligable. 77 No Implications are intended as this behaviour is desired by default. We just get better looking maps. The cost of extracting the colors from the in-memory representation of the XML data describing the map are presumed to be negligable. However, the color quantification can be costly. 75 78 76 79 == Test Plan == … … 108 111 5. Possible memory issues: I think the current approach follows an easy producer consumer style regarding the color tables. [[BR]] 109 112 My insight into the server architecture is limited and I am not 100% sure if all possible memory leaks have been avoided. 113 114 6. The algorithm parsing the MdfModel simply collects all different MdfStrings from the color fields. In order to support expressions for those colors the list simply needs to be reinterpreted when read from the MgMap object. Lacking useful test cases this has not been done as yet.