parseFeature static method
- GeoJSONFeature feature
Parses a GeoJSON feature and returns a list of PowerGeoFeature instances.
feature: The GeoJSON feature to parse.
Returns a list of PowerGeoFeature instances based on the provided GeoJSON feature.
Implementation
static List<PowerGeoFeature> parseFeature(GeoJSONFeature feature) {
GeoJSONGeometry? geometry = feature.geometry;
Map<String, dynamic>? properties = feature.properties;
List<double>? bbox = feature.bbox;
String? title = feature.title;
dynamic id = feature.id;
if (geometry == null) return <PowerGeoFeature>[];
return parseGeometry(
geometry,
properties: properties,
bbox: bbox,
title: title,
id: id,
);
}