Last updated

API / geotoolkit / map / util / GeoJSON / GeoJSON

Class: GeoJSON

util.GeoJSON.GeoJSON

GeoJSON parser and converter

Table of contents

Constructors
Methods

Contents

Constructors

new GeoJSON()

new GeoJSON()

Methods

getClassName

getClassName(): string

Returns

string


getClassName

Static getClassName(): string

Returns

string


parse

Static parse(geoJsonFeatures, iGetFeatureId?, crsConversion?, coordinateOrder?): AbstractFeature[]

Creates GeoToolkit Shape-based AbstractFeature objects based on GeoJSON features

Parameters

Name Type Description
geoJsonFeaturesFeatureObject | FeatureObject[]array of GeoJSON features
Optional iGetFeatureIdIGetIdhow to retrieve feature id from geoJson feature's properties
Optional crsConversionCrsConversionfunction for converting points into the map coordinate system
Optional coordinateOrderCoordinateOrderx/y coordinate order ([1, 0] to reverse)

Returns

AbstractFeature[]


toGeoJSON

Static toGeoJSON(features, crsConversion?, coordinateOrder?): Feature

Converts GeoToolkit Shape-based AbstractFeature objects to GeoJSON format

Parameters

Name Type Description
featuresAbstractFeature | AbstractFeature[] | Iterator<AbstractFeature>features to be converted to GeoJSON
Optional crsConversionCrsConversionfunction for converting points into the result coordinate system
Optional coordinateOrderCoordinateOrderx/y coordinate order ([1, 0] to reverse)

Returns

Feature