[mapserver-dev] Problem with metadata

Yewondwossen Assefa yassefa at dmsolutions.ca
Wed Sep 3 11:08:21 EDT 2008


Hi There,

  I have done some quick tests removing/setting/saving the metadata but 
could not reproduce the cases that you have seen.  I could not also 
locate something obvious in the code that could explain the behavior you 
see. If there is  some way I can  replicate it locally with some 
dataset/map, I am will to look into it more.  Note that all tests I have 
done are with the 5.2 version.

Best Regards,

Tommy Roughol wrote:
> Hello everyone,
> 
> I have a problem with PHP Mapscript. When I add or remove some 
> metadatas, sometimes metadatas are removed without reasons.
> For instance, I have a metadata "description", and when I do 
> "$oLayer->removeMetaData('toto');"or "$oLayer->setMetaData('toto', 
> 'titi');", the metadata description is deleted, but not always, sometimes.
> 
> Is there an issue ?
> Is this a known bug ?
> 
> I had to use a hack like this to avoid this problem :
> 
> // I save my metadata Description
> $szLayer = $oLayer->getMetaData('DESCRIPTION');
> 
> // i remove metadatas
> if($oLayer->getMetaData('REPORT_BIRT') != '') {
> $oLayer->removeMetaData('REPORT_BIRT');
> }
> if($oLayer->getMetaData('ID_BIRT') != '') {
> $oLayer->removeMetaData('ID_BIRT');
> }
> if($oLayer->getMetaData('OUTPUT_BIRT') != '') {
> $oLayer->removeMetaData('OUTPUT_BIRT');
> }
> 
> // i save metadata to avoid the strange remove that happens sometimes
> $oLayer->setMetaData("DESCRIPTION", $szLayer);
> $oMap->save($szPathMap);
> 
> Thanks a lot
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev


-- 
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------



More information about the mapserver-dev mailing list