UNPKG

@geogirafe/lib-geoportal

Version:

GeoGirafe is a flexible application to build online geoportals.

24 lines (23 loc) 1.41 kB
import { AttributeTypeGroup } from './filter.js'; export declare const xmlNumberTypesStrList: string[]; export declare const xmlStringTypesStrList: string[]; export declare const xmlDatetimeTypesStrList: string[]; export declare const xmlGeometryTypesStrList: string[]; export type XmlGeometryType = (typeof xmlGeometryTypesStrList)[number]; export declare const xmlTypesStrList: readonly string[]; export type XmlTypes = (typeof xmlTypesStrList)[number]; export declare function isStringNumeric(str: string): boolean; export declare function isString(attributeType: XmlTypes): boolean; export declare function isNumber(attributeType: XmlTypes): boolean; export declare function isDate(attributeType: XmlTypes): boolean; export declare function isGeometry(attributeType: XmlTypes): boolean; /** * Sanitizes the given geometry type by removing the 'gml:' prefix and simplifying it to one of the types * defined in xmlGeometryTypesStrList. Example: `gml:MultiLineStringPropertyType` -> `multilinestring` */ export declare function sanitizeGeometryType(attributeType: string): XmlGeometryType; /** * Checks if the geometry type can be considered area-like or is unknown, useful when doing `CONTAINS` comparisons. */ export declare function isAreaLikeGeometryTypeOrUnknown(attributeType: XmlGeometryType): boolean; export declare function typeGroupFromAttributeType(attributeType: XmlTypes): AttributeTypeGroup;