Version 47 (modified by stefanl, 3 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

  • scenario 1 - reference to external inspire service metadata
    WEB
      METADATA
        "wms_inspire_capabilities" "url"                      #enables inspire using scenario 1
        "wms_inspire_languages" "eng,ger"                     #first default, values according ISO 639-2/B
        "wms_metadataurl_href" "mymetadataurlhref"
        "wms_metadataurl_format" "mymetadataurlformat"
        "wms_title" "mytitle"
        "wms_abstract" "myabstract"
        "wms_fees" "conditions unknown"                       #value either "no conditions apply"|default "conditions unknown"|<specific conditions>
        "wms_accessconstraints" "none"                        #value according ISO 19115 (MD_RestrictionCode codelist) or default "none"
        "wms_contactorganization" "mycontactorganization"     #responsible organisation
        "wms_contactposition" "resourceProvider"              #responsible organisation, value according "INSPIRE Metadata Regulation" (part D6)
      END
    END
    
    GetCapabilities? request with parameter LANGUAGE=ger results in
    ...
      <inspire_vs:ExtendedCapabilities>
        <inspire_common:MetadataUrl xsi:type="inspire_common:resourceLocatorType">
          <inspire_common:URL>mymetadataurlhref</inspire_common:URL>
          <inspire_common:MediaType>mymetadataurlformat</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>eng</inspire_common:Language>
          </inspire_common:SupportedLanguage>
          <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
    WEB
      METADATA
        "wms_inspire_capabilities" "embed"                    #enables inspire using scenario 2
        "wms_inspire_languages" "eng,ger"                     #first default, values according ISO 639-2/B
        "wms_title" "mytitle"
        "wms_abstract" "myabstract"
        "wms_onlineresource" "myonlineresource"               #resource locator, optional
        "wms_inspire_keyword" "infoMapAccessService"          #value according "classification of spatial data services"
        "wms_inspire_temporal_reference" "2011-09-19"         #date of last revision, value according YYYY-MM-DD
        "wms_inspire_conformity" "not evaluated"              #value either "conformant"|"not conformant"|default "not evaluated"
        "wms_fees" "conditions unknown"                       #value either "no conditions apply"|default "conditions unknown"|<specific conditions>
        "wms_accessconstraints" "none"                        #value according ISO 19115 (MD_RestrictionCode codelist) or default "none"
        "wms_contactorganization" "mycontactorganization"     #responsible organisation
        "wms_contactposition" "resourceProvider"              #responsible organisation, value according "INSPIRE Metadata Regulation" (part D6)
        "wms_inspire_mpoc_name" "mympocname"                  #point of contact
        "wms_inspire_mpoc_email" "mympocemail"                #point of contact
        "wms_inspire_metadatadate" "2011-09-19"               #value according YYYY-MM-DD
      END
    END
    
    GetCapabilities? request with parameter LANGUAGE=ger results in
    ...
    <inspire_vs:ExtendedCapabilities>
      <inspire_common:ResourceLocator>
        <inspire_common:URL>myonlineresource</inspire_common:URL>
      </inspire_common:ResourceLocator>
      <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:MandatoryKeyword xsi:type="inspire_common:classificationOfSpatialDataService">
        <inspire_common:KeywordValue>infoMapAccessService</inspire_common:KeywordValue>
      </inspire_common:MandatoryKeyword>
      <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>eng</inspire_common:Language>
        </inspire_common:SupportedLanguage>
        <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>
    ...
    
    • <inspire_common:ResourceType> always set to "service"
    • <inspire_common:SpatialDataServiceType> always set to "view"
    • only one keyword currently supported (subject to change for future versions)



status reports