[mapserver-dev] MS RFC 87: Bitmap pattern support

thomas bonfort thomas.bonfort at gmail.com
Tue Feb 26 07:24:24 PST 2013


Hi Tamas,

This would be a nice addition, and currently the only way to support
the mapinfo brushes.

I have a couple of remarks:

- you definitely can reuse the BITMAP keyword for this, and think it
would be a much better fit than PATTERNMAP
- you state that GAP cannot be supported, however I don't think that
there are any technical limitations as to why this would be the case.
Actually looking at the code I believe it would be supported without
any further modifications, so there's no reason to force
symbolstyle->gap to 0.

- msCreateBitmapSymbol is only called in getTile(), however the BITMAP
symbols are switch selectable from rendering function which do not use
getTile() (notably msImagePolylineMarkers) => msCreateBitmapSymbol
should probably be called from a few other places. There might also be
a small optimization here in order not to set the pixels of the
rasterbuffer to the style->color for each feature (i.e. if
imagepath[i]==1 and pixel[i][j].color=style.color you can break out of
the loop prematurely as the pixels have already been set to the
correct color at a previous feature)

cheers,
thomas

On 14 January 2013 23:30, Tamas Szekeres <szekerest at gmail.com> wrote:
> Developers,
>
> I have added a new RFC document proposing a solution for creating bitmap
> patterns. This is in fact a new symbol type PATTERNMAP (wanted to use BITMAP
> but it was already reserved for other purposes) which is aware of color and
> backgroundcolor settings and rendered equally well with the various kind of
> renderers. Currently we have no such option to achieve the same result, by
> using vector symbols we can not provide the same look for most of the
> renderers (agg, cairo), due to the possible antialiasing behaviour of the
> line drawings.
>
> Please find the complete RFC document at this location:
> http://mapserver.org/trunk/development/rfc/ms-rfc-87.html
>
> I have also created a tracking ticket for this addition:
> https://github.com/mapserver/mapserver/issues/4561
>
> The corresponding implementation has been added to this branch:
> https://github.com/szekerest/mapserver/tree/bitmapsymbol
>
> I have also prepared a sample test case providing to implement all the
> mapinfo symbols for auto style (see result image attached to this post):
> http://www.gisinternals.com/tests/testbrushpatterns.zip
>
> Let me know about your opinion.
>
> Best regards,
>
> Tamas
>
>
>
> _______________________________________________
> 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