[mapserver-dev] UTFGrid support

thomas bonfort thomas.bonfort at gmail.com
Sat Jul 13 02:15:38 PDT 2013


Sorry, not much time to give details...

On 11 July 2013 17:47, Francois Desjarlais <fdesjarlais1 at gmail.com> wrote:
> Hi Thomas,
>
> I worked a lot in the UTFGrid renderer recently and I have a question about
> AGG to ask you. First, you wrote to Daniel in your latest discussion about
> UTFGrid that it was possible to use AGG with int32u instead of colors. But
> going through AGG doc, I can't find any mention to it. Is changing the
> rendering buffer type from colors chars to int32u really going to make it or
> is there more thing to change like pixel_format and color_type? If so is it
> possible to generate any color_type and pixel_format from template because
> those already in place only use color chars.

You'd have to change the whole chain of agg templating to use int32u
and other relevant typedefs for a grid renderer. You should probably
have a look at the mapnik grid renderer for inspiration. Once again
the utfgrid renderer and the current mapserver agg renderer have very
little in common aside from the fact that they are using agg
primitives as a backend (and given that agg is so flexible due to it's
usage of templates, that means not much in common at all).

>
> Also, in your recommandation mail you wrote:
> "you should not be messing with map->cellsize, scale, width, height,etc...
> inside mapdraw.c. Your utfRes adjustments should be private to the
> utfrenderer."
> But the image width, height and resolution are set outside the createImage
> function in the mapdraw.c. The image variables are set directly from the map
> such as image->resolution = map->resolution. If I try to set my own width,
> height and res they get overwritten by those right outside the createImage
> function. I know AGG don't set these inside its createImage but is it the
> same with every renderer? If it isn't the same with every renderer, is it
> possible to move that code inside AGG so image variables don't get
> overwritten after they get out of createImage?
c.f AGG_RENDERER(image) in which you can assign a structure that's
private to your renderer. You would typically be storing the utfRes in
there, to pass as a parameter to your path_adaptor so it applies the
wanted scaling. (e.g. in mapagg.cpp, bool use_alpha is a private
bookkeeping variable to indicate wether we should be exporting an
alpha channel or not)

>
> Thanks!
> Francois
>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>


More information about the mapserver-dev mailing list