| Modifier and Type | Class and Description |
|---|---|
| public static class | GeoJsonUtils.
Converter output target that writes a GeoJson. |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final String[] | TYPES
0-based type names of geometries, subtract 1 from type code to get index in this array. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static byte[] | Returns: GeoJson representation of the specified geometrygeometry object in EWKB format ewkb, int dimension system of the specified object, may be the same or
smaller than its real dimension system. M dimension system is
not supported. dimensionSystem)Converts EWKB with known dimension system to GeoJson. |
| public static byte[] | Returns: GeoJson representation of the specified geometrygeometry object in GeoJson format json, int the SRID of geometry srid)Converts EWKB with known dimension system to GeoJson. |
| private static void | |
| private static void | |
| private static void | |
| private static void | |
| private static void | |
| private static void | |
| private static void | |
| private static double |
| TYPES | back to summary |
|---|---|
| pack-priv static final String[] TYPES 0-based type names of geometries, subtract 1 from type code to get index in this array. | |
| GeoJsonUtils | back to summary |
|---|---|
| private GeoJsonUtils() | |
| ewkbToGeoJson | back to summary |
|---|---|
| public static byte[] ewkbToGeoJson(byte[] ewkb, int dimensionSystem) Converts EWKB with known dimension system to GeoJson.
| |
| geoJsonToEwkb | back to summary |
|---|---|
| public static byte[] geoJsonToEwkb(byte[] json, int srid) Converts EWKB with known dimension system to GeoJson.
| |
| parse | back to summary |
|---|---|
| private static void parse(JSONValue v, GeometryUtils. | |
| parse | back to summary |
|---|---|
| private static void parse(JSONObject o, GeometryUtils. | |
| parseCoordinate | back to summary |
|---|---|
| private static void parseCoordinate(JSONValue v, GeometryUtils. | |
| parseGeometryCollection | back to summary |
|---|---|
| private static void parseGeometryCollection(JSONObject o, GeometryUtils. | |
| parseLineString | back to summary |
|---|---|
| private static void parseLineString(JSONArray a, GeometryUtils. | |
| parsePolygon | back to summary |
|---|---|
| private static void parsePolygon(JSONArray a, GeometryUtils. | |
| parseRing | back to summary |
|---|---|
| private static void parseRing(JSONValue[] points, GeometryUtils. | |
| readCoordinate | back to summary |
|---|---|
| private static double readCoordinate(JSONValue[] values, int index) | |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private boolean | |
| private boolean | |
| private final JSONByteArrayTarget | |
| private int | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | GeoJsonTarget(JSONByteArrayTarget
output JSON target output, int dimension system to use dimensionSystem)Creates new GeoJson output target. |
| Modifier and Type | Method and Description |
|---|---|
| protected void | addCoordinate(double
X coordinate x, double Y coordinate y, double Z coordinate (NaN if not used) z, double M coordinate (NaN if not used) m, int 0-based index of coordinate in the current sequence index, int total number of coordinates in the current sequence total)Implements abstract org. Invoked to add a coordinate to a geometry. |
| protected void | endNonEmptyPolygon()
Overrides org. Invoked after writing of non-empty POLYGON. |
| protected void | endObject(int
type of the object type)Overrides org. Invoked after writing of the object. |
| protected void | startCollection(int
type of collection, one of
type, int GeometryUtils#MULTI_POINT,
GeometryUtils#MULTI_LINE_STRING,
GeometryUtils#MULTI_POLYGON,
GeometryUtils#GEOMETRY_COLLECTIONnumber of items in this collection numItems)Overrides org. Invoked before writing of a collection. |
| protected GeometryUtils. | startCollectionItem(int
0-based index of this item in the collection index, int total number of items in the collection total)Overrides org. Invoked before writing of a collection item. |
| protected void | startLineString(int
number of points in line string numPoints)Overrides org. Invoked before writing a LINESTRING. |
| protected void | startPoint()
Overrides org. Invoked before writing a POINT. |
| protected void | startPolygon(int
number of inner polygons numInner, int number of points in outer polygon numPoints)Overrides org. Invoked before writing a POLYGON. |
| protected void | startPolygonInner(int
number of points in inner polygon numInner)Overrides org. Invoked before writing an inner polygon in POLYGON. |
| private void | |
| private void | |
| private void |
| dimensionSystem | back to summary |
|---|---|
| private final int dimensionSystem | |
| inMulti | back to summary |
|---|---|
| private boolean inMulti | |
| inMultiLine | back to summary |
|---|---|
| private boolean inMultiLine | |
| output | back to summary |
|---|---|
| private final JSONByteArrayTarget output | |
| type | back to summary |
|---|---|
| private int type | |
| wasEmpty | back to summary |
|---|---|
| private boolean wasEmpty | |
| GeoJsonTarget | back to summary |
|---|---|
| public GeoJsonTarget(JSONByteArrayTarget output, int dimensionSystem) Creates new GeoJson output target.
| |
| addCoordinate | back to summary |
|---|---|
| protected void addCoordinate(double x, double y, double z, double m, int index, int total) Implements abstract org. Doc from org. Invoked to add a coordinate to a geometry.
| |
| endNonEmptyPolygon | back to summary |
|---|---|
| protected void endNonEmptyPolygon() Overrides org. Doc from org. Invoked after writing of non-empty POLYGON.
| |
| endObject | back to summary |
|---|---|
| protected void endObject(int type) Overrides org. Doc from org. Invoked after writing of the object.
| |
| startCollection | back to summary |
|---|---|
| protected void startCollection(int type, int numItems) Overrides org. Doc from org. Invoked before writing of a collection.
| |
| startCollectionItem | back to summary |
|---|---|
| protected GeometryUtils. Overrides org. Doc from org. Invoked before writing of a collection item.
| |
| startLineString | back to summary |
|---|---|
| protected void startLineString(int numPoints) Overrides org. Doc from org. Invoked before writing a LINESTRING.
| |
| startPoint | back to summary |
|---|---|
| protected void startPoint() Overrides org. Doc from org. Invoked before writing a POINT.
| |
| startPolygon | back to summary |
|---|---|
| protected void startPolygon(int numInner, int numPoints) Overrides org. Doc from org. Invoked before writing a POLYGON. If polygon is empty, both parameters are 0.
| |
| startPolygonInner | back to summary |
|---|---|
| protected void startPolygonInner(int numInner) Overrides org. Doc from org. Invoked before writing an inner polygon in POLYGON.
| |
| writeDouble | back to summary |
|---|---|
| private void writeDouble(double v) | |
| writeHeader | back to summary |
|---|---|
| private void writeHeader(int type) | |
| writeStartObject | back to summary |
|---|---|
| private void writeStartObject(int type) | |