met_office_api/models/point.rs
1/*
2 * Global three hourly spot data
3 *
4 * This API provides three hourly weather forecast data for a requested coordinate defined by a latitude and longitude. The format of the data is GeoJSON.
5 *
6 * The version of the OpenAPI document: 1.0.1
7 * Contact: enquiries@metoffice.gov.uk
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
15pub struct Point {
16 /// The longitude, latitude and elevation values for the point
17 #[serde(rename = "coordinates")]
18 pub coordinates: Vec<f32>,
19 /// The GeoJSON type identifier
20 #[serde(rename = "type")]
21 pub r#type: String,
22}
23
24impl Point {
25 pub fn new(coordinates: Vec<f32>, r#type: String) -> Point {
26 Point {
27 coordinates,
28 r#type,
29 }
30 }
31}
32
33