Package org.h2.util.geometry

# Class GeoJsonUtils

java.lang.Object
org.h2.util.geometry.GeoJsonUtils

public final class GeoJsonUtils extends Object
GeoJson format support for GEOMETRY data type.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static final class`
`GeoJsonUtils.GeoJsonTarget`
Converter output target that writes a GeoJson.

## Method Summary

Modifier and Type
Method
Description
`static byte[]`
`ewkbToGeoJson(byte[] ewkb, int dimensionSystem)`
Converts EWKB with known dimension system to GeoJson.
`static byte[]`
`geoJsonToEwkb(byte[] json, int srid)`
Converts GeoJson with known dimension system to EWKB.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### ewkbToGeoJson

public static byte[] ewkbToGeoJson(byte[] ewkb, int dimensionSystem)
Converts EWKB with known dimension system to GeoJson.

Parameters:
  `ewkb` - geometry object in EWKB format
  `dimensionSystem` - dimension system of the specified object, may be the same or smaller than its real dimension system. M dimension system is not supported.
Returns:
  GeoJson representation of the specified geometry
Throws:
  `DbException` - on unsupported dimension system

### geoJsonToEwkb

public static byte[] geoJsonToEwkb(byte[] json, int srid)
Converts GeoJson with known dimension system to EWKB.

Parameters:
  `json` - geometry object in GeoJson format
  `srid` - the SRID of geometry
Returns:
  EWKB representation of the specified geometry
Throws:
  `DbException` - on unsupported dimension system