1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! # kml
//!
//! KML support for Rust with a focus on conversion to [`geo-types`](https://github.com/georust/geo) primitives.
//! Currently only partial read/write support is implemented.
//!
//! ## Example
//!
//! ```
//! use kml::Kml;

//! let kml_str = r#"
//! <Polygon>
//!   <outerBoundaryIs>
//!     <LinearRing>
//!     <tessellate>1</tessellate>
//!     <coordinates>
//!         -1,2,0
//!         -1.5,3,0
//!         -1.5,2,0
//!         -1,2,0
//!     </coordinates>
//!     </LinearRing>
//!   </outerBoundaryIs>
//! </Polygon>
//! "#;
//!
//! let kml: Kml = kml_str.parse().unwrap();
//! ```

#![cfg_attr(docsrs, feature(doc_cfg))]

pub mod types;

pub use crate::types::{Kml, KmlDocument, KmlVersion};

mod errors;
pub use crate::errors::Error;

pub mod reader;
pub use crate::reader::KmlReader;

pub mod writer;
pub use crate::writer::KmlWriter;

#[cfg(feature = "geo-types")]
pub mod conversion;

#[cfg(feature = "geo-types")]
pub use conversion::quick_collection;

#[cfg(feature = "zip")]
mod kmz_reader;

#[cfg(feature = "zip")]
pub use kmz_reader::*;