[mapserver-dev] RFC-93: UTFGrid output

Lime, Steve D (MNIT) Steve.Lime at state.mn.us
Wed Aug 28 07:07:58 PDT 2013


Hi Francois: Could your JSON escaping code implemented as a utility function in mapstring.c? I could see some use for it in other areas (e.g. templating).

Steve

From: mapserver-dev-bounces at lists.osgeo.org [mailto:mapserver-dev-bounces at lists.osgeo.org] On Behalf Of Francois Desjarlais
Sent: Wednesday, August 28, 2013 9:00 AM
To: Even Rouault
Cc: mapserver-dev at lists.osgeo.org; Daniel Morissette
Subject: Re: [mapserver-dev] RFC-93: UTFGrid output

Hi Even,

Thanks for your feedback.
I'll be looking at these points and do the necessary changes.

My code is already escaping non-valid characters in the JSON. It should always return a valid one.
Also, I don't have enough time to add the suggested mode before the end of the project and school restarting.

Regards
Francois

2013/8/27 Even Rouault <even.rouault at mines-paris.org<mailto:even.rouault at mines-paris.org>>
Le lundi 26 août 2013 13:06:18, Daniel Morissette a écrit :
> Hi Devs,
>
> RFC-93 has been updated by François to reflect his implementation of
> UTGGrid output in MapServer over the summer. Please have a look and
> share your comments so that he has time to make any required changes
> before the end of his project:
>
>   http://mapserver.org/development/rfc/ms-rfc-93.html
>
> A sample app and docs are available at:
>
>   http://msgsoc.mapgears.com/
>
> And his code is in branch utfgridgsoc of his github fork:
>
>   https://github.com/fdesj/mapserver/tree/utfgridgsoc
Nice work.

A few points and ideas :

* http://msgsoc.mapgears.com/html/en/output/utfgrid.html mentions "UTFGrids
can be set on multiple layers but only one UTFGrid can be rendered at a time"
but the RFC not. Perhaps this could be added in it too.

* I'm wondering if the JSON escaping of values expanded in the "keys" (from
UTFITEM)  and "data" (from UTFDATA) has been taken into account (in particular
escaping of " and \ ). My quick review of the code seems to indicate no, but I
might be wrong.

* perhaps there could be a mode (for the lazy folks ;-) ) in which UTFDATA
could be generated automatically from the "gml_include_items" and
"gml_exclude_items" layer metadata ?

* No validation of UTFRESOLUTION is done (line 310). If set to values < 1,
this could lead to divizon by zero or failed mallocs due to negative values.
Such values shoud likely be refused.

* r->duplicates = strcmp("false", msGetOutputFormatOption(format,
"DUPLICATES", "true")); at line 320 is a convoluted way of writing :

 r->duplicates = EQUAL("true",  msGetOutputFormatOption(format, "DUPLICATES",
"true"));

or !EQUAL("false", ... )

* MSVC will not be happy with wchar_t string[img->width/renderer-
>utfresolution + 1]; at line 378


Even

--
Geospatial professional services
http://even.rouault.free.fr/services.html
_______________________________________________
mapserver-dev mailing list
mapserver-dev at lists.osgeo.org<mailto:mapserver-dev at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/mapserver-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20130828/9b8bcc73/attachment-0001.html>


More information about the mapserver-dev mailing list