opengeospatial / poi

OGC Points of Interest Encoding Specification
Apache License 2.0
21 stars 28 forks source link

"free" scheme for "category" #72

Open kunlinyu opened 2 years ago

kunlinyu commented 2 years ago

7.4 category " To emulate a "folksonomy" or "free tagging", the scheme shall be "free" "

I was confused. The type of scheme is URI. What does "the scheme shall be free" mean?

  1. the uri is "free" ?
  2. the uri point to a resource, which contain one string "free" ?

Which one is correct?

I Try to do the first one, but I get an exeption, because "free" is not a valid URI according to https://www.rfc-editor.org/rfc/rfc2396.html

using System;

public class POIProperties
{
    public string id;
    public Uri href;
    public string value;
    public Uri Base;
    public string type;
    public string lang;
    public DateTime created;
    public DateTime updated;
    public DateTime deleted;
    public POIProperties author;
    public POIProperties rights;
    public string term;
    public Uri scheme;
}

var category = new POIProperties()
{
    term = "restaurant",
    scheme = new System.Uri("free"),  // <<  UriFormatException: Invalid URI: The format of the URI could not be determined.
    value = "a restaurant",
};

If I use scheme = new System.Uri("http://free"), the exception disappear but I think this is not a correct implememtation.

geofizzydrink commented 1 year ago

We need to review this in the context of the "Best Practices" Guide

cmheazel commented 1 year ago

Codelists are commonly used in both OGC and ISO standards. They will probably work well here.

A codelist is a managed registry of values. In essence, a managed enumeration. These registries are usually available as an on-line resource. The OGC hosts a number of codelist registries.

A codelist object has two attributes: 1) codelist - an URI which identifies the codelist registry. Usually resolvable. 2) codelistvalue - a string value which corresponds to one of the entries in the registry.

Some advantages of using codelists are: 1) The URI identifies the domain or authority for this codelist 2) New entries can be added as needed 3) De-referencing the combined codelist/codelistvalue URL can return a description of what this term means. 4) New codelists can be created as needed.