Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ParsedFeatures

Implements

Index

Constructors

  • new ParsedFeatures(type: string, size: number, features: () => Promise<Feature<Geometry>[]>, hasFeaturesFlag: boolean, geometryTypes: ("Point" | "LineString" | "Polygon")[], propertyNames: string[], projection?: null | string): ParsedFeatures
  • Parameters

    • type: string
    • size: number
    • features: () => Promise<Feature<Geometry>[]>
        • (): Promise<Feature<Geometry>[]>
        • Returns Promise<Feature<Geometry>[]>

    • hasFeaturesFlag: boolean
    • geometryTypes: ("Point" | "LineString" | "Polygon")[]
    • propertyNames: string[]
    • projection: null | string = null

    Returns ParsedFeatures

Properties

geometryTypes: ("Point" | "LineString" | "Polygon")[]

The geometry types encountered in this source file

name: string

The name of this source

projection: null | string = null

The projection of this feature. If not set, the projection is unknown and the user should specify the projection for these features. If set, it should be the projection used when adding the features to a vector layer

propertyNames: string[]

The property names of features in this source file. This is generally based on sampling the first feature.

size: number

The size of the source file

type: string

The type of the source file

Methods

  • addTo(source: VectorSource<Geometry>, mapProjection: ProjectionLike, dataProjection?: ProjectionLike): Promise<void>
  • Adds the parsed features from this file to the given vector data source

    Parameters

    • source: VectorSource<Geometry>
    • mapProjection: ProjectionLike
    • Optional dataProjection: ProjectionLike

    Returns Promise<void>

  • getDistinctValues(propertyName: string): Promise<string[]>
  • hasFeatures(): boolean
  • Indicates if there are any features. If false, it signals that the parsing attempt failed

    Returns boolean

Generated using TypeDoc