[mapserver-dev] hoto add new key in mapfiles

Martin Kofahl M.Kofahl at gmx.net
Fri Sep 4 08:49:03 EDT 2009


Hi Daniel,
no luck when compiling:

g++ ... -o shp2img
./libmapserver.a(mapfile.o): In function `getCharacter': mapfile.c:212: undefined reference to `msyylineno'
./libmapserver.a(mapfile.o): In function `getInteger': mapfile.c:202: undefined reference to `msyylineno'
./libmapserver.a(mapfile.o): In function `getDouble': mapfile.c:189: undefined reference to `msyylineno'
./libmapserver.a(mapfile.o): In function `getString': mapfile.c:176: undefined reference to `msyylineno'
./libmapserver.a(mapfile.o): In function `loadHashTable': mapfile.c:1706: undefined reference to `msyylineno'
./libmapserver.a(mapfile.o):mapfile.c:244: more undefined references to `msyylineno' follow
collect2: ld returned 1 exit status


I did add '#define RESTRICTION 9999' nead the bottom of mapfile.h.
And I did add '<INITIAL>restriction { return(RESTRICTION); }' wight after resolution in maplexer.l. After make clean && make maplexer.c also contains this keyword, but make fails at the end with no other errors before.


I'd like to have a spatial filter at layers basis using polygons which might be derived from another DATA statement or, probably easier, from another layer similar to a postgis tileindex layer. I already got some help from the libgd-people. So far I only played with msDrawLayer, but handling cached label and featureinfos might be required, too.

Martin

-------- Original-Nachricht --------
> Datum: Fri, 04 Sep 2009 07:12:29 -0400
> Von: Daniel Morissette <dmorissette at mapgears.com>
> An: mapserver-dev at lists.osgeo.org
> Betreff: Re: [mapserver-dev] hoto add new key in mapfiles

> Martin Kofahl wrote:
> > Hi,
> > I currently investigate possibilities of adding per-layer spatial
> obligation to mapserver. I would like to have a new key 'restriction' for then
> layer section, but can not find the maplexer files documented. Can you give
> me a hint, please.
> > 
> 
> You need to add the new keyword to maplexer.l (note the alphabetical 
> order) and add an id for it in mapfile.h. Flex should take care of the 
> rest next time you run make.
> 
> BTW, what do you mean by "spatial obligation"? A spatial filter? I can 
> see how that could be useful in some cases. Are you thinking of 
> specifying only a BBOX as filter or would a polygon filter also be 
> supported?
> 
> Daniel
> -- 
> Daniel Morissette
> http://www.mapgears.com/
> _______________________________________________
> 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