On the train into work this morning, I was working on a project idea. The idea is a multi-layered map in SVG for a wargame. Now, the various layers are primarily meant for segregation of data, by purpose, in memory. For instance, a height map layer that contains data showing topographic heights; another map that dictates foliage layer and density, etc. The purpose of layering is to allow the map to toggle visibility of the layer (using <g> element grouping) and limit the amount of data that the engine will have to search to resolve a data check (so it only searches the Foliage layer, and not the height map, for foliage density checks).
Layers of Map
Layer numbers are numbered from 0 upwards, so higher numbered layers are above, or painted later than, the lower numbered layers.
# Vis? Usage and notes Bits Style
0 Y Topographic visual map 32 SVG
1 N Height map (256g) 8 BMP
2 Y Water visual map 8 SVG
3 N Water depth map (256g) boolean subtracted from topographic height map 8 BMP
4 Y Manmade visual map roads, buildings, bridges, constructions 2 SVG
5 Y Foliage visual map 8 SVG
6 N Foliage depth map (256g) boolean added to topographic height map 8 BMP
7 Y Element plotting layer 8 SVG
8 Y Effects plotting layer smoke, light 16 SVG ?
9 Y Overlay plotting layer planning overlays 8 SVG
10 Y Grid lines 8 SVG
1920000 pixels in a 1600x1200 px map. Since the some layers are SVG (text), they wont count pixel by pixel.
Now, my question is this: For the SVG layers, does the color depth impact the memory requirements for that 'layer' at all? Does Batik default all SVGs as a specific color depth (32-bit), or does it dynamically examine the data and use memory based on what it finds?
Would a black and white (2-bit) SVG of text take less memory than an identical 32-bit color SVG of the same node/shape/glyph data?
- Memory reqs of an SVG? John
- Re: Memory reqs of an SVG? thomas . deweese
- Re: Memory reqs of an SVG? John
- Re: Memory reqs of an SVG? thomas . deweese
