Skip to content

Commit

Permalink
better errors in convert_geojson_to_geo
Browse files Browse the repository at this point in the history
  • Loading branch information
martinhamel committed Nov 17, 2024
1 parent 40b9154 commit 51d41d0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/db/road_work.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ fn convert_geojson_to_geo(geometry: &GeoJsonGeometry) -> Result<GeoGeometry<f64>
.collect(),
)))
}
_ => Err("Unsupported geometry type"),
GeoJsonValue::MultiPoint(_) => Err("Unsupported geometry type MultiPoint"),
GeoJsonValue::MultiLineString(_) => Err("Unsupported geometry type MultiLineString"),
GeoJsonValue::MultiPolygon(_) => Err("Unsupported geometry type MultiPolygon"),
GeoJsonValue::GeometryCollection(_) => Err("Unsupported geometry type GeometryCollection"),
}
}

0 comments on commit 51d41d0

Please sign in to comment.