[API](/solutions/geotoolkit/geotoolkit_js/apis/readme) / [geotoolkit](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit) / [map](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map) / [util](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map#util) / [GeoJSON](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map.util-3.geojson) / GeoJSON

# Class: GeoJSON

[util](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map#util).[GeoJSON](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map.util-3.geojson).GeoJSON

GeoJSON parser and converter

## Table of contents

Constructors
- [new GeoJSON()](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.map.util-3.geojson.geojson.md#new geojson())


Methods
| [getClassName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.util-3.geojson.geojson#getclassname) | [getClassName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.util-3.geojson.geojson#getclassname-1) | [parse](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.util-3.geojson.geojson#parse) |
|  --- | --- | --- |
| [toGeoJSON](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.util-3.geojson.geojson#togeojson) |


## 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`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.features.abstractfeature.abstractfeature)[]

Creates GeoToolkit Shape-based [AbstractFeature](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.features.abstractfeature.abstractfeature) objects based on GeoJSON features

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `geoJsonFeatures` | [`FeatureObject`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map.util-3.geojson#geojson#featureobject) | [`FeatureObject`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map.util-3.geojson#geojson#featureobject)[] | array of GeoJSON features |
| `Optional` `iGetFeatureId` | [`IGetId`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.features.strategies.igetid.igetid) | how to retrieve feature id from geoJson feature's properties |
| `Optional` `crsConversion` | [`CrsConversion`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map.util-3.geojson#geojson#crsconversion) | function for converting points into the map coordinate system |
| `Optional` `coordinateOrder` | [`CoordinateOrder`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map.util-3.geojson#geojson#coordinateorder) | x/y coordinate order ([1, 0] to reverse) |


#### Returns

[`AbstractFeature`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.features.abstractfeature.abstractfeature)[]

#### toGeoJSON

▸ `Static` **toGeoJSON**(`features`, `crsConversion?`, `coordinateOrder?`): [`Feature`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map.util-3.geojson#geojson#feature)

Converts GeoToolkit Shape-based [AbstractFeature](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.features.abstractfeature.abstractfeature) objects to GeoJSON format

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `features` | [`AbstractFeature`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.features.abstractfeature.abstractfeature) | [`AbstractFeature`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.features.abstractfeature.abstractfeature)[] | [`Iterator`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.iterator.iterator)<[`AbstractFeature`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.features.abstractfeature.abstractfeature)&gt; | features to be converted to GeoJSON |
| `Optional` `crsConversion` | [`CrsConversion`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map.util-3.geojson#geojson#crsconversion) | function for converting points into the result coordinate system |
| `Optional` `coordinateOrder` | [`CoordinateOrder`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map.util-3.geojson#geojson#coordinateorder) | x/y coordinate order ([1, 0] to reverse) |


#### Returns

[`Feature`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map.util-3.geojson#geojson#feature)