[Mapserver-users] mapscript: new functions numMetaData and keyMetaData required
Sean Gillies
sgillies at frii.com
Mon Sep 22 07:39:52 PDT 2003
On Monday, September 22, 2003, at 02:33 AM, m.spring at gmx.de wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi list,
>
> Mapscript currently has no methods to retrieve existing metadata
> without knowing its keys.
>
> Therefore I have written two new methods:
> 'numMetaData' gets the number of metadata entries (like
> map->numlayers),
> and 'keyMetaData(pos)' gets the key of the metadata entry on position
> 'pos'.
>
> To achieve this functionality patching of maphash.c, maphash.h and
> mapscript.i is necessary. The patches are context-diffed against the
> mapserver cvs-version of sunday, sept. 21, 2003 and can be downloaded
> from
>
> http://dream.lrrl.arch.tu-muenchen.de/~springm/mapserver/
> maphash_patches/maphash.c.patch
> http://dream.lrrl.arch.tu-muenchen.de/~springm/mapserver/
> maphash_patches/maphash.h.patch
> http://dream.lrrl.arch.tu-muenchen.de/~springm/mapserver/
> maphash_patches/mapscript.i.patch
>
> I hope this patch can be included in the current and future versions
> of mapserver.
> I have filed it as a enhancement request in bugzilla.
>
> Markus
Hi Markus,
I've added myself to the cc: list for this issue because it's also an
important
one for me.
My idea for improving metadata in 4.1 would be to solve the issues
between
MapServer and SWIG that currently prevent a hashTableObj from being
exposed
as a mapping object. Then we'd write the interface that would let us
access
a hashTableObj as though it were a Perl/PHP associative array or Python
dictionary, or as close to this as we can manage. Minimum would be
keys()
and hash get/set functions so that we could do
for $key in $layer->{'metadata'}->keys() {
$value = $layer->{'metadata'}->{key};
}
or
for key in layer.metadata.keys():
value = layer.metadata[key]
Are you interested in taking your patch further in this direction?
cheers,
Sean
--
Sean Gillies
sgillies at frii dot com
http://www.frii.com/~sgillies
More information about the MapServer-users
mailing list