GeoJSONUtils: {
    fromFlat3Coordinates: ((flat3Coords, geometryType) => GeoJSON.Geometry);
    fromFlatCoordinates: ((flatCoords, geometryType) => GeoJSON.Geometry);
    getOpenLayersFeature: ((feature) => Feature);
    toFlatCoordinates: ((geojson) => number[]);
}

Type declaration

  • fromFlat3Coordinates: ((flat3Coords, geometryType) => GeoJSON.Geometry)
      • (flat3Coords, geometryType): GeoJSON.Geometry
      • Creates a simple GeoJSON Geometry object from a list of 3D coordinates.

        Parameters

        • flat3Coords: [number, number, number][]

          Coordinates

        • geometryType: "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon" | "GeometryCollection"

          Geometry type

        Returns GeoJSON.Geometry

        GeoJSON geometry object

  • fromFlatCoordinates: ((flatCoords, geometryType) => GeoJSON.Geometry)
      • (flatCoords, geometryType): GeoJSON.Geometry
      • Creates a simple GeoJSON Geometry object from a list of flat coordinates.

        Prefer fromFlat3Coordinates if possible (quicker, no object creation).

        Parameters

        • flatCoords: number[]

          Coordinates

        • geometryType: "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon" | "GeometryCollection"

          Geometry type

        Returns GeoJSON.Geometry

        GeoJSON geometry object

  • getOpenLayersFeature: ((feature) => Feature)
      • (feature): Feature
      • Parameters

        • feature: Feature<Geometry, GeoJsonProperties>

        Returns Feature

  • toFlatCoordinates: ((geojson) => number[])
      • (geojson): number[]
      • Given a simple GeoJSON Geometry object, returns the flat coordinates

        Parameters

        • geojson: Geometry

          GeoJSON geometry object

        Returns number[]

        Flat coordinates