Options
All
  • Public
  • Public/Protected
  • All
Menu

Defines parsed features

export
interface

IParsedFeatures

since

0.13

Hierarchy

  • IParsedFeatures

Implemented by

Index

Properties

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

The geometry types encountered in this source file

since

0.14

name: string

The name of this source

projection: null | string

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.

since

0.14

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

    since

    0.14 This method is now async (returns a promise)

    Parameters

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

    Returns Promise<void>

  • getDistinctValues(propertyName: string): Promise<string[]>
  • Get all distinct values for the given property name

    since

    0.14

    Parameters

    • propertyName: string

    Returns Promise<string[]>

  • hasFeatures(): boolean
  • Indicates if there are any features. If false, it signals that the parsing attempt failed

    Returns boolean

Generated using TypeDoc