INCLUDE capability added...

Steve Lime Steve.Lime at DNR.STATE.MN.US
Thu Jul 6 09:24:08 EDT 2006


No problem, don't blame you. I was just happy it seems to work. Bug 279 has existed for ages for this enhancement so we can use that. I updated last night and again this morning with a more comprehensive description.

Steve

>>> Daniel Morissette <dmorissette at MAPGEARS.COM> 07/06/06 7:52 AM >>>
Cool!

This may not warrant a RFC, but could you please at least create a bug 
report to document the enhancement, when it was added, what the 
implications and limitations are, etc. (basically what you wrote in your 
email).

Sorry to be a pain about this, but it's always easier to point users to 
bug reports or RFCs in release notes than having to tell them to dig 
through the list archives to find the information (that's assuming they 
are registered and able to reach the list archives).

Daniel

Steve Lime wrote:
> Hi all: I sat down and actually read the Flex manual last night and discovered a simple ability to support INCLUDEd files. It's implemented within the lexer so doesn't impact any of the C source. Only a basic implementation is in place but it seems to work nicely, so now you can do stuff like:
> 
> MAP
>   NAME 'include'
>   EXTENT 0 0 500 500
>   SIZE 250 250
>   
>   INCLUDE "test_include_symbols.map"
>   INCLUDE "test_include_layer.map"
> END
> 
> where test_include_symbols.map contains:
> 
>   SYMBOL
>     NAME 'square'
>     TYPE VECTOR
>     FILLED TRUE
>     POINTS 0 0 0 1 1 1 1 0 0 0 END
>   END
> 
> and test_include_layer.map contains:
> 
>   LAYER
>     TYPE POINT
>     STATUS DEFAULT
>     FEATURE
>       POINTS 10 10 40 20 300 300 400 10 10 400 END
>     END
>     CLASS
>       NAME 'Church'
>       COLOR 0 0 0
>       SYMBOL 'square'
>       SIZE 7
>       STYLE
>         SYMBOL "square"
>         SIZE 5
>         COLOR 255 255 255
>       END
>       STYLE
>         SYMBOL "square"
>         SIZE 3
>         COLOR 0 0 255
>       END
>     END
>   END
> 
> I think this could be extended to non-filebased sources but this'll do for now. Some caveats:
> 
>   - the filename must be double qouted for the moment
>   - I'm sure there will be some pathing issues
>   - I'm not sure everything (especially file handles) is being cleaned up properly yet
>   - includes are never written when the mapObj is written to disk (I don't think it's necessary or even possible to do so)
> 
> Anyway, it was simple to add and will be simple to back out if necessary. Figured it was worth testing since it is backwards compatible.
> 
> Steve
> 


-- 
Daniel Morissette
http://www.mapgears.com/



More information about the mapserver-dev mailing list