public class

GeoJsonGeometryParser

extends Object
java.lang.Object
   ↳ com.mapsted.map.map_overlay.datasource.GeoJsonGeometryParser

Class Overview

mostly based on https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.2

Summary

Nested Classes
class GeoJsonGeometryParser.GeoJsonGeometryParserException  
Public Constructors
GeoJsonGeometryParser()
Public Methods
static ArrayList<ArrayList<Double>> parseAsLineString(JsonArray input)
For type "LineString", the "coordinates" member is an array of two or more positions.
static ArrayList<ArrayList<ArrayList<Double>>> parseAsMultiLineString(JsonArray input)
For type "MultiLineString", the "coordinates" member is an array of LineString coordinate arrays.
static ArrayList<ArrayList<Double>> parseAsMultiPoint(JsonArray input)
For type "MultiPoint", the "coordinates" member is an array of positions.
static ArrayList<ArrayList<ArrayList<ArrayList<Double>>>> parseAsMultiPolygon(JsonArray input)
array of polygons
static ArrayList<Double> parseAsPoint(JsonArray coordinates)
For type "Point", the "coordinates" member is a single position.
static ArrayList<ArrayList<ArrayList<Double>>> parseAsPolygon(JsonArray input)
For type "Polygon", the "coordinates" member MUST be an array of linear ring coordinate arrays.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public GeoJsonGeometryParser ()

Public Methods

public static ArrayList<ArrayList<Double>> parseAsLineString (JsonArray input)

For type "LineString", the "coordinates" member is an array of two or more positions.

public static ArrayList<ArrayList<ArrayList<Double>>> parseAsMultiLineString (JsonArray input)

For type "MultiLineString", the "coordinates" member is an array of LineString coordinate arrays.

public static ArrayList<ArrayList<Double>> parseAsMultiPoint (JsonArray input)

For type "MultiPoint", the "coordinates" member is an array of positions.

public static ArrayList<ArrayList<ArrayList<ArrayList<Double>>>> parseAsMultiPolygon (JsonArray input)

public static ArrayList<Double> parseAsPoint (JsonArray coordinates)

For type "Point", the "coordinates" member is a single position.

public static ArrayList<ArrayList<ArrayList<Double>>> parseAsPolygon (JsonArray input)

For type "Polygon", the "coordinates" member MUST be an array of linear ring coordinate arrays. A linear ring is a closed LineString with four or more positions. first item is the outer polygon. the subsequent items are inner polygon aka holes.