Skip to content

Commit

Permalink
Convert GDAL date/time fields to string fields
Browse files Browse the repository at this point in the history
  • Loading branch information
pka committed Nov 24, 2021
1 parent a81c0c0 commit fb8b9c7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions t-rex-gdal/src/gdal_fields.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,13 @@ impl<'a> Feature for VectorFeature<'a> {
Ok(Some(FieldValue::IntegerValue(v))) => Some(FeatureAttrValType::Int(v as i64)),
Ok(Some(FieldValue::Integer64Value(v))) => Some(FeatureAttrValType::Int(v)),
Ok(Some(FieldValue::RealValue(v))) => Some(FeatureAttrValType::Double(v)),
Ok(Some(FieldValue::DateValue(v))) => {
Some(FeatureAttrValType::String(v.to_string()))
}
Ok(Some(FieldValue::DateTimeValue(v))) => {
Some(FeatureAttrValType::String(v.to_string()))
}
Ok(Some(FieldValue::IntegerListValue(_)))
| Ok(Some(FieldValue::DateValue(_)))
| Ok(Some(FieldValue::DateTimeValue(_)))
| Ok(Some(FieldValue::Integer64ListValue(_)))
| Ok(Some(FieldValue::RealListValue(_)))
| Ok(Some(FieldValue::StringListValue(_))) => {
Expand Down

0 comments on commit fb8b9c7

Please sign in to comment.