Open tbonfort opened 12 years ago
Author: tomkralidis Date: 2005/03/26 - 21:16
...and here's the change to mapwms.c:
msIO_printf(" <Attribution>\n");
msOWSPrintEncodeMetadata(stdout, &(map->web.metadata), "MO",
"contactorganization", OWS_WARN, "
<Title>%s</Title>\n", map->name);
msOWSPrintEncodeMetadata(stdout, &(map->web.metadata), "MO",
"service_onlineresource", OWS_NOERR,
" <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\"
xlink:href=\"%s\"/>\n", script_url_e
ncoded);
msOWSPrintURLType(stdout, &(map->web.metadata), "MO","logourl",
OWS_NOERR, NULL, "LogoURL", NULL,
" width=\"%s\"", " height=\"%s\"",
">\n <Format>%s</Format",
"\n <OnlineResource "
"xmlns:xlink=\"http://www.w3.org/1999/xlink\""
" xlink:type=\"simple\" xlink:href=\"%s\"/>\n"
" ",
MS_FALSE, MS_TRUE, MS_TRUE, MS_TRUE, MS_TRUE,
NULL, NULL, NULL, NULL, NULL, " ");
msIO_printf(" </Attribution>\n");
Author: dmorissette Date: 2005/03/28 - 17:22
Tom, why was <Attribution> created if it's just a duplication of already
existing information? It doesn't make sense to me to just duplicate existing
information only for the sake of providing an <Attribution> element. Should
there not be new metadata items for this new element?
Author: tomkralidis Date: 2005/03/29 - 00:57
As per the DTD comments, Attribution exists to specify provider information for
a specific Layer or set of Layer (remember Attribution is available to Layer at
*any* level of nesting). So, in the spec sense, one use case is that it's there
if one WMS happens to serve layers from multiple data providers. This would
allow data providers to have attribution :), and the *service* metadata would be
info for the service provider.
What I've seen in implementations is that alot of WMSs are setup so that
Attribution metadata repeats whatever service metadata there is. Capabilities
parsers can then decipher between the two.
Still, I see what you are saying. My initial wish for this was to leverage the
LogoURL element of a WMS, which is available in Attribution. It's a cool way to
identify WMS servers in client apps, etc.
Perhaps we can enable the following metadata:
wms_attribution_title
wms_attribution_onlineresource
wms_attribution_logourl_href
wms_attribution_logourl_format
wms_attribution_logourl_width
wms_attribution_logourl_height
...then, if defined in WEB/METADATA this would go in the root Layer element.
If defined in the LAYER/METADATA element this would get defined in the data
Layer elements.
Of course, this all gets shuffled around when OWS Common rolls into play. But
that's another story we don't have to worry about for now.
My suggestion, given level of effort and the forthcoming OWS Common would be to
enable this for only root Layer level element.
Comments?
Author: tomkralidis Date: 2005/04/06 - 19:43
Here's what the code would look like given the proposal of new metadata (for
WEB/METADATA -> ROOT Layer element) as per comment 3:
msIO_printf(" <Attribution>\n");
msOWSPrintEncodeMetadata(stdout, &(map->web.metadata), "MO",
"attribution_title", OWS_WARN, "
<Title>%s</Title>\n", map->name);
msOWSPrintEncodeMetadata(stdout, &(map->web.metadata), "MO",
"attribution_onlineresource", OWS_NOERR,
" <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\"
xlink:href=\"%s\"/>\n", script_url_encoded);
msOWSPrintURLType(stdout, &(map->web.metadata), "MO","attribution_logourl",
OWS_NOERR, NULL, "LogoURL", NULL,
" width=\"%s\"", " height=\"%s\"",
">\n <Format>%s</Format",
"\n <OnlineResource "
"xmlns:xlink=\"http://www.w3.org/1999/xlink\""
" xlink:type=\"simple\" xlink:href=\"%s\"/>\n"
" ",
MS_FALSE, MS_TRUE, MS_TRUE, MS_TRUE, MS_TRUE,
NULL, NULL, NULL, NULL, NULL, " ");
msIO_printf(" </Attribution>\n");
If this is okay and can be patched into mapwms.c, I can post some info about
this element and new metadata for documentation.
Author: assefa Date: 2005/05/25 - 21:44
Reassigning to me.
I will add the code according to comment #4.
Author: assefa Date: 2005/05/26 - 17:03
Tom,
quick questions on this :
should there be a test to see if any of the attribution metadata is
defined before outputing the <Attribution> element. I find it a bit
inconsistent to output a warning message on the attribution_title metadata
when the Attribution is not a manadatory element. Here is the xml I get for a
test wms map file with no attribution metadat defined :
...
<BoundingBox SRS="EPSG:4326"
minx="-2" miny="-2" maxx="-1" maxy="6" />
<Attribution>
<!-- WARNING: Mandatory metadata '..._attribution_title' was missing in this
context. -->
<Title>MS</Title>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="http://www2.dmsolutions.ca/cgi-bin/mswms_ogc_cite?"/>
</Attribution>
<Layer queryable="1" opaque="0" cascaded="0">
....
Author: tomkralidis Date: 2005/05/26 - 17:09
Yes, there should be a test as it's not a required element. Can it be processed
/ outputted in the same manner as optional elements?
Author: assefa Date: 2005/05/26 - 18:02
I will implement it as the other optional paramters testing if one of the
attrbution_title/onlineresource/logo exists.
Only those with a metadata will be outputted. I do not thonk that there is a
need to use default values if the metadada does not exist (eg map->name for
the title element). Is this ok ?
Author: tomkralidis Date: 2005/05/26 - 18:09
This is ok.
Author: assefa Date: 2005/05/26 - 23:23
Added the support : web level metadata needed fot the output are :
wms/ows_attribution_title
wms/ows_attribution_onlineresource"
wms/ows_attribution_logourl_width"
wms/ows_attribution_logourl_height"
wms/ows_attribution_logourl_format"
wms/ows_attribution_logourl_href"
Tom if things are ok, i will assign it to jeff for doc update. Also if you
have some notes you want to add to the doc, please update the bug.
Author: tomkralidis Date: 2005/05/26 - 23:41
Tested; works. Nice!
OK, I'll add some docu to this bug too. Jeff, you can paraphrase from the WMS
1.1.1 DTD:
<!-- Attribution indicates the provider of a Layer or collection of Layers.
The provider's URL, descriptive title string, and/or logo image URL may be
supplied. Client applications may choose to display one or more of these
items. A format element indicates the MIME type of the logo image located at
LogoURL. The logo image's width and height assist client applications in
laying out space to display the logo. -->
wms/ows_attribution_title
wms/ows_attribution_onlineresource
wms/ows_attribution_logourl_width
wms/ows_attribution_logourl_height
wms/ows_attribution_logourl_format
wms/ows_attribution_logourl_href
Author: assefa Date: 2005/05/27 - 00:26
Reassign to Jeff for Documentation update.
Author: jmckenna@dmsolutions.ca Date: 2005/06/09 - 19:39
moving to documentation Component
Author: jmckenna@dmsolutions.ca Date: 2005/06/11 - 20:39
added attribution metadata to wms-server doc, in CVS.
Reporter: tomkralidis Date: 2005/03/26 - 21:15