[mapguide-internals] RFC60 - PNG8 color palette improvements pleasecomment

Zac Spitzer zac.spitzer at gmail.com
Sun Mar 1 23:38:26 EST 2009


The per scale range idea is good, ie uploading s0.pal, s1.pal and so on

While we are messing with the MapDefinition, it would be good to add a static
file at the root of the map's tilecache with all the configured values.

Then we can add a GETTILECONFIG mapagent call which returns this file in either
GeoJSON or XML so we can access via AJAX a tiled map without needing
to call the API, which can be expensive

The main problem being tackled here is area fills such as oceans which often
get colored differently.

z

On Mon, Mar 2, 2009 at 2:37 PM, Jason Birch <Jason.Birch at nanaimo.ca> wrote:
> Hi UV,
>
> I'm not a graphics guru, but I have a few comments:
>
> I really think that this work should be preceded by moving the definition of the tile / base layer image format out of the serverconfig.ini file and into the MapDefinition.  One size definitely does not fit all here.
>
> The palette to use should be defined at the base map scale range level, not at the map level.  It's quite possible that maps will use signifigantly different colour palettes at different scale ranges; look at Google Maps.
>
> There should be an option for the user to hard-code the palette by attaching a PNG via resource data and reference it somewhere in the base map definition's extended data XML.
>
> I don't think that parsing the layer definitions for colours is going to be adequate.  Both antialiasing and transparency will lead to situations where important colours are not explicitly defined in the layer definitions.  I believe that in production scenarios, it will be worthwhile to have a way of seeding the entire scale range at PNG24 and then analyzing the resulting images to generate an optimal 8 bit palette (and then attaching that to the map resource).
>
> Jason
>
> ________________________________
>
> From: mapguide-internals-bounces at lists.osgeo.org on behalf of UV
> Sent: Sun 2009-03-01 5:59 PM
> To: MapGuide Internals Mail List
> Subject: [mapguide-internals] RFC60 - PNG8 color palette improvements pleasecomment
>
>
>
> Hello,
>
> there is RFC60 place in the list and needs some commenting.
> Currently, we are looking into a serverconfig.ini parameter
> UseColorPalette in the TileServiceSection.
> upon init of the tile cache this parses the map definition and produces
> a palette with the map colors.
> Those are then used in some 100 extra line of C code in AGGImageIo.cpp
> to force those colors in
> the map used for the PNG8 created from the truecolor tile passed in by
> the rendering service.
>
> 1- which memory strategy is recommended for the color quantization? (3
> options in the RFC (stack, fast heap, efficient heap))
> 2 - is the ServerTileService the right place to put the code to collect
> the map colors?
> 3 - any suggestions regarding the naming and location of the color
> palette within the map definition?
>
> Comments are welcome!
> Also a few guiding remarks concerning the integration of the
> configuration code would make extremely helpful
> as just knowing where to start looking saves day of wasted code studies.
> These things are missing in the architecture
> docs so far.
>
> This is work in progress as there is a sponsor for it.
> Thanks for your support.
> UV
>
> _______________________________________________
> mapguide-internals mailing list
> mapguide-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>
>
>
> _______________________________________________
> mapguide-internals mailing list
> mapguide-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>
>



-- 
Zac Spitzer -
http://zacster.blogspot.com
+61 405 847 168


More information about the mapguide-internals mailing list