1#![doc = include_str!("../README.md")]
2extern crate core;
3
4macro_rules! validate_stream {
6 ($stream:expr, $expected:pat $(,)?) => {
7 if !matches!($stream.meta.stream_type, $expected) {
8 return Err($crate::MltError::UnexpectedStreamType2(
9 $stream.meta.stream_type,
10 stringify!($expected),
11 stringify!($stream),
12 ));
13 }
14 };
15}
16
17macro_rules! with_kinds {
23 ($m:ident) => {
24 $m! {
25 scalar { Bool, I8, U8, I32, U32, I64, U64, F32, F64 }
26 string { Str }
27 }
28 };
29}
30
31pub use fast_mvt;
32pub use geo_types;
33
34pub(crate) mod codecs;
35pub(crate) mod convert;
36pub(crate) mod decoder;
37pub mod dump;
38pub mod encoder;
39pub(crate) mod errors;
40pub(crate) mod tile;
41pub(crate) mod utils;
42
43pub use convert::{geojson, mvt};
44pub use decoder::{
45 ColNames, ColumnRef, Decoder, FeatureRef, GeometryType, GeometryValues, Layer, Layer01,
46 Layer01FeatureIter, LendingIterator, ParsedLayer, ParsedLayer01, Parser, PropName,
47 PropNamesIter, PropValueRef, Unknown,
48};
49pub(crate) use decoder::{
52 ColumnType, DictRange, DictionaryType, LengthType, OffsetType, RawPresence, RawSharedDict,
53 RawSharedDictItem, StreamType,
54};
55#[cfg(feature = "unstable-v2")]
56pub use decoder::{
57 Layer02, MValueColumn, MValueSpans, MValues, Nested, ParsedInterior, ParsedLayer02, ParsedLeaf,
58 ParsedList, ParsedMValue, ParsedMap, ParsedNested, ParsedNode, ParsedStruct, RawInterior,
59 RawLeaf, RawList, RawMValue, RawMap, RawNested, RawNode, RawStruct,
60};
61pub(crate) use errors::MltRefResult;
62pub use errors::{MltError, MltResult};
63pub use tile::{
64 ColumnRole, Extent, PropKind, PropValue, PropertyKey, TileFeature, TileFeatureBuilder,
65 TileLayer, TileLayerBuilder,
66};
67#[cfg(feature = "unstable-v2")]
68pub use tile::{MValue, MValueKey, NestedKey, NestedKind, NestedValue, ZStep};
69pub(crate) use utils::analyze::{Analyze, StatType};
70pub(crate) use utils::lazy_state::{Decode, DecodeState, Lazy, LazyParsed, Parsed};
71
72pub mod wire {
78 #[cfg(feature = "unstable-v2")]
79 pub use crate::decoder::stream::model::XyzLogical;
80 pub use crate::decoder::stream::model::{
81 Alp, BoolLogical, DictionaryType, FastPForKind, FloatLogical, IntEncoding, IntLogical,
82 LengthType, LogicalEncoding, LogicalTechnique, Morton, OffsetType, PhysicalEncoding,
83 RleLayout, RleMeta, StreamMeta, StreamType, ValueKind, VertexLogical,
84 };
85 pub use crate::decoder::{ColumnDecl, ColumnStorage, ColumnType, DictLayout, StringLayout};
86 #[cfg(feature = "unstable-v2")]
87 pub use crate::decoder::{GeoLayout, LayerLayout};
88 pub use crate::utils::analyze::{Analyze, StatType};
89}
90
91#[cfg(any(test, feature = "__private"))]
92pub use crate::utils::test_helpers;
93
94#[cfg(any(test, feature = "__private"))]
96#[doc(hidden)]
97pub mod __private {
98 pub use crate::codecs::*;
99 pub use crate::convert::*;
100 pub use crate::decoder::*;
101 pub use crate::errors::*;
102 pub use crate::test_helpers::*;
103 pub use crate::tile::*;
104 pub use crate::utils::analyze::*;
105 pub use crate::utils::lazy_state::*;
106 pub use crate::utils::*;
107}