| Modifier and Type | Method and Description |
|---|---|
GeoJson.Builder |
add(Feature feature)
Add a feature.
|
GeoJson.Builder |
bbox(double[] bbox)
Set the optional
bbox (bounding box) field of this feature
collection. |
String |
toJson()
Serialize builder to its equivalent JSON representation.
|
void |
write(Path path)
Serialize builder to its equivalent JSON representation and write to file
at
path. |
public GeoJson.Builder add(Feature feature)
Feature to create
new features.feature - to addFeaturepublic GeoJson.Builder bbox(double[] bbox)
bbox (bounding box) field of this feature
collection. See the GeoJSON specification
bbox - to setpublic String toJson()
IllegalStateException - if builder is emptypublic void write(Path path) throws IOException
path.IllegalStateException - if builder is emptyIOException