[Mapserver-users] functions to parse a map file?

Antti.Roppola at brs.gov.au Antti.Roppola at brs.gov.au
Sun Jun 6 21:57:08 EDT 2004


Use Mapscript as it parses the mapfile and lets
you access properties directly. Ditto, rather than
manipulating an array, you can plug changed properties
or values right back into it.

And map files are pretty easy to parse anyhow. While it's
not tagged, it is pretty rigidly structured.

Antti


-----Original Message-----
From: Mark Adams [mailto:markadams at cuestasys.com]
Sent: Saturday, 5 June 2004 6:39 AM
To: 'mapserver-users'
Subject: [Mapserver-users] functions to parse a map file?


Hi all,
 
We are developing a sample site with Mapserver 4.2 and PHP mapscript. We'd like to add some custom functions that require that we can determine at run time certain aspects of the layers being published through the map file, for example what type of data the layer is (e.g. raster, shapefile), what its geometry type is (e.g. polygon, line), etc. We had been thinking we'd parse the map file on initial load, and access it programmatically from a set of arrays; but as the map file structure is not XML based there isn't an easy way of parsing the map file directly. Are there any built-in functions available to allow us to do this?
 
Thanks for any help you can provide.
 
------------------------------
Mark Adams
Business & Systems Analyst
Cuesta Systems Inc.
5230 South Service Road
Burlington, ON L7L 5K2
Phone: 905-333-4544 x14
Fax: 905-333-0455
Email: markadams at cuestasys.com
 



More information about the mapserver-users mailing list