Version 50 (modified by stefanl, 4 years ago)

--

google summer of code 2011 - inspire view service support

 source code repository

tasks

multi language support

 corresponding post

A
language specific metadata values


"wms_title" "my title"
"wms_title" "mein titel"
B
language dependent reference data


DATA "shapes/rivers_eng.shp"
DATA "shapes/german/rivers.shp"
1
key extension
"wms_title_eng" "my title"
"wms_title_ger" "mein titel"
--- main question: should resolution happen at
i) write time, i.e. only wms_title goes into mapobject
or
ii) read time, i.e. everything goes into mapobject,
extended key e.g. wms_title_ger is used for reading

mapfile maintainable? validation?
2
runtime substitution
---DATA "shapes/rivers_%language%.shp"

with language being a request parameter or global setting
already implemented in mapserver for certain parameters

all required substitution scenarios (parameters) covered?
3
externalization


using external files
lang.eng
lang.ger
"wms_title" "IDC_TITLE"

IDC_TITLE=my title
IDC_TITLE=mein titel
DATA "IDC_SHAPES_RIVERS"

IDC_SHAPES_RIVERS=shapes/rivers.shp
IDC_SHAPES_RIVERS=shapes/german/rivers.shp
common way of internationalization,
many tools available to externalize strings

at which time the externalized value should be resolved
(while parsing mapfile, during msApplySubstitutions, ...)?
4
merge


using INCLUDE
--- standard.map
LAYER
...
NAME "rivers"
INCLUDE "rivers.map"
...

eng/rivers.map
DATA "shapes/rivers_eng.shp"

ger/rivers.map
DATA "shapes/german/rivers.shp"
mostly implemented in mapserver

based on current languange the corresponding
map file needs to be included

only usable for whole "blocks"
(like a LAYER or the WEB/METADATA section)
5
override


override certain values
of the original mapfile
e.g. with override.ger
"wms_title" "my title" #1

1="mein titel"
LAYER
...
NAME "rivers"
DATA "shapes/rivers_eng.shp" #2
...

2="shapes/german/rivers.shp"
identification of "key" e.g. by comment like #1 and #2

other option: use XPath-like syntax
e.g.
WEB/METADATA/wms_title="mein titel"
LAYER[rivers]/DATA="shapes/german/rivers.shp"

 patch #3608 uses A1 (applied at read time) and B2

view service metadata

(i) title and abstract are localized (e.g. wms_abstract_ger), fallback to wms_abstract if parameter language=eng and wms_abstract_eng not specified
(ii) only one keyword support (at the moment), needs to be specified explicitly using wms_inspire_keyword
(iii) the above points also apply to rootlayer (e.g. wms_rootlayer_abstract_ger, wms_inspire_rootlayer_keyword) and individual layers
(iv) usage of group/classgroup to set name of style to inspire_common:DEFAULT

  • scenario 1 - reference to external inspire service metadata

 example map file

(i) enabled by wms_inspire_capabilities set to url

GetCapabilities? request with parameter LANGUAGE=ger results in

...
<inspire_vs:ExtendedCapabilities>
  <inspire_common:MetadataUrl xsi:type="inspire_common:resourceLocatorType">
    <inspire_common:URL>http://inspire.service/metadata</inspire_common:URL> 
    <inspire_common:MediaType>inspire.service.format</inspire_common:MediaType> 
  </inspire_common:MetadataUrl>
  <inspire_common:SupportedLanguages>
    <inspire_common:DefaultLanguage>
      <inspire_common:Language>eng</inspire_common:Language> 
    </inspire_common:DefaultLanguage>
    <inspire_common:SupportedLanguage>
      <inspire_common:Language>ger</inspire_common:Language> 
    </inspire_common:SupportedLanguage>
  </inspire_common:SupportedLanguages>
  <inspire_common:ResponseLanguage>
  <inspire_common:Language>ger</inspire_common:Language> 
  </inspire_common:ResponseLanguage>
</inspire_vs:ExtendedCapabilities>
...
  • scenario 2 - embedded inspire service metadata

 example map file

(i) enabled by wms_inspire_capabilities set to embed
(ii) <inspire_common:ResourceType> always set to service
(iii) <inspire_common:SpatialDataServiceType> always set to view

GetCapabilities? request with parameter LANGUAGE=ger results in

...
<inspire_vs:ExtendedCapabilities>
  <inspire_common:ResourceType>service</inspire_common:ResourceType> 
  <inspire_common:TemporalReference>
  <inspire_common:DateOfLastRevision>2011-09-19</inspire_common:DateOfLastRevision> 
  </inspire_common:TemporalReference>
  <inspire_common:Conformity>
    <inspire_common:Degree>not evaluated</inspire_common:Degree> 
  </inspire_common:Conformity>
  <inspire_common:MetadataPointOfContact>
    <inspire_common:OrganisationName>mympocname</inspire_common:OrganisationName> 
    <inspire_common:EmailAddress>mympocemail</inspire_common:EmailAddress> 
  </inspire_common:MetadataPointOfContact>
  <inspire_common:MetadataDate>2011-09-19</inspire_common:MetadataDate> 
  <inspire_common:SpatialDataServiceType>view</inspire_common:SpatialDataServiceType> 
  <inspire_common:Keyword xsi:type="inspire_common:classificationOfSpatialDataService">
    <inspire_common:KeywordValue>infoMapAccessService</inspire_common:KeywordValue> 
  </inspire_common:Keyword>
  <inspire_common:SupportedLanguages>
    <inspire_common:DefaultLanguage>
      <inspire_common:Language>eng</inspire_common:Language> 
    </inspire_common:DefaultLanguage>
    <inspire_common:SupportedLanguage>
      <inspire_common:Language>ger</inspire_common:Language> 
    </inspire_common:SupportedLanguage>
  </inspire_common:SupportedLanguages>
  <inspire_common:ResponseLanguage>
    <inspire_common:Language>ger</inspire_common:Language> 
  </inspire_common:ResponseLanguage>
</inspire_vs:ExtendedCapabilities>
...

status reports