#![doc = include_str!("../README.md")]
extern crate core;
macro_rules! validate_stream {
($stream:expr, $expected:pat $(,)?) => {
if !matches!($stream.meta.stream_type, $expected) {
return Err($crate::MltError::UnexpectedStreamType2(
$stream.meta.stream_type,
stringify!($expected),
stringify!($stream),
));
}
};
}
macro_rules! with_kinds {
($m:ident) => {
$m! {
scalar { Bool, I8, U8, I32, U32, I64, U64, F32, F64 }
string { Str }
}
};
}
pub use fast_mvt;
pub use geo_types;
pub(crate) mod codecs;
pub(crate) mod convert;
pub(crate) mod decoder;
pub mod dump;
pub mod encoder;
pub(crate) mod errors;
pub(crate) mod tile;
pub(crate) mod utils;
pub use convert::{geojson, mvt};
pub use decoder::{
ColNames, ColumnRef, Decoder, FeatureRef, GeometryType, GeometryValues, Layer, Layer01,
Layer01FeatureIter, LendingIterator, ParsedLayer, ParsedLayer01, Parser, PropName,
PropNamesIter, PropValueRef, Unknown,
};
pub(crate) use decoder::{
ColumnType, DictRange, DictionaryType, LengthType, OffsetType, RawPresence, RawSharedDict,
RawSharedDictItem, StreamType,
};
#[cfg(feature = "unstable-v2")]
pub use decoder::{
Layer02, MValueColumn, MValueSpans, MValues, Nested, ParsedInterior, ParsedLayer02, ParsedLeaf,
ParsedList, ParsedMValue, ParsedMap, ParsedNested, ParsedNode, ParsedStruct, RawInterior,
RawLeaf, RawList, RawMValue, RawMap, RawNested, RawNode, RawStruct,
};
pub(crate) use errors::MltRefResult;
pub use errors::{MltError, MltResult};
pub use tile::{
ColumnRole, Extent, PropKind, PropValue, PropertyKey, TileFeature, TileFeatureBuilder,
TileLayer, TileLayerBuilder,
};
#[cfg(feature = "unstable-v2")]
pub use tile::{MValue, MValueKey, NestedKey, NestedKind, NestedValue, ZStep};
pub(crate) use utils::analyze::{Analyze, StatType};
pub(crate) use utils::lazy_state::{Decode, DecodeState, Lazy, LazyParsed, Parsed};
pub mod wire {
#[cfg(feature = "unstable-v2")]
pub use crate::decoder::stream::model::XyzLogical;
pub use crate::decoder::stream::model::{
Alp, BoolLogical, DictionaryType, FastPForKind, FloatLogical, IntEncoding, IntLogical,
LengthType, LogicalEncoding, LogicalTechnique, Morton, OffsetType, PhysicalEncoding,
RleLayout, RleMeta, StreamMeta, StreamType, ValueKind, VertexLogical,
};
pub use crate::decoder::{ColumnDecl, ColumnStorage, ColumnType, DictLayout, StringLayout};
#[cfg(feature = "unstable-v2")]
pub use crate::decoder::{GeoLayout, LayerLayout};
pub use crate::utils::analyze::{Analyze, StatType};
}
#[cfg(any(test, feature = "__private"))]
pub use crate::utils::test_helpers;
#[cfg(any(test, feature = "__private"))]
#[doc(hidden)]
pub mod __private {
pub use crate::codecs::*;
pub use crate::convert::*;
pub use crate::decoder::*;
pub use crate::errors::*;
pub use crate::test_helpers::*;
pub use crate::tile::*;
pub use crate::utils::analyze::*;
pub use crate::utils::lazy_state::*;
pub use crate::utils::*;
}