Jesus Loves GRASS

Technical blog about GRASS/GIS,open source geoinformatics and MAPSERVER.

Monday, April 16, 2007

WCS and WFS metadata

I forgot that aside from the information if the map is downloadable or not is is also necessary to know what service, so another metadata tag was added

METADATA
"ows_service" "wcs"
END

it can be "wcs" or "wfs"

The programming is basically the same for the download but simpler since is it only a property and it doesn't need functions like isDownload()

The getMetadata is a bit different because the wcs and wfs are string and need '', otherwise the javascript eval() will not work (this functions runs the init.php reply)

$ows_service = "null";
if ($oLayer->getMetaData ("ows_service") !="") {
if(strcasecmp($oLayer->getMetaData("ows_service"), "wcs") == 0)
$ows_service = "'wcs'";

if(strcasecmp($oLayer->getMetaData("ows_service"), "wfs") == 0)
$ows_service = "'wfs'";

}

Labels: , , ,

0 Comments:

Post a Comment

<< Home