iwf
    Preparing search index...

    Class GlobeCoordinateSnak

    Class for the GlobeCoordinateSnak.

    Most used property of this type is P625 (coordinate location).

    Hierarchy (View Summary)

    • Snak
      • GlobeCoordinateSnak
    Index
    • Parameters

      • snak: {
            datatype?: "globe-coordinate";
            datavalue?: {
                type: "globecoordinate";
                value: {
                    altitude?: null;
                    globe: string;
                    latitude: number;
                    longitude: number;
                    precision: number;
                };
            };
            hash?: string;
            property: string;
            snaktype: "value"
            | "somevalue"
            | "novalue";
        }

        The snak for this class in JSON format.

      Returns GlobeCoordinateSnak

      If the input does not match this datatype's Wikidata schema.

      const snak = new GlobeCoordinateSnak(json);
      
    altitude: null | undefined

    The altitude of the Coordinate

    datatype: string = dataType
    globe: string | undefined

    The "globe" that this coordinate refers to. Globe defaults to "Earth" (globe: http://www.wikidata.org/entity/Q2).

    hash: string | undefined
    latitude: number | undefined

    The latitude of the Coordinate

    longitude: number | undefined

    The longitude of the Coordinate

    precision: number | undefined

    The precision of the Coordinate

    property: `P${number}`
    snaktype: "value" | "somevalue" | "novalue"
    • get hasValue(): boolean

      Checks if the snak has a value.

      Returns boolean

      True if the snak has a value.

    • get internalID(): string

      Creates a unique ID for the Snak.

      Returns string

      The ID.

    • Returns {
          datatype?: "globe-coordinate";
          datavalue?: {
              type: "globecoordinate";
              value: {
                  altitude?: null;
                  globe: string;
                  latitude: number;
                  longitude: number;
                  precision: number;
              };
          };
          hash?: string;
          property: string;
          snaktype: "value"
          | "somevalue"
          | "novalue";
      }

      The snak as JSON.

      const json = globeCoordinateSnak.toJSON();