Open kylebarron opened 8 hours ago
For reference, in geoarrow-rs we plan to use the wkt
crate directly for reading/writing WKT instead of using the geozero wrapper. See https://github.com/geoarrow/geoarrow-rs/issues/790, https://github.com/geoarrow/geoarrow-rs/issues/762
In cases like GeoArrow, it's nice to know if all input geometries have a common geometry type.
This would mean an API like
and then
infer_type
would only parse up to the first(
character, using that text to infer the geometry type and dimension.There's a tradeoff between time spent first parsing the text to get the geometry types and then again to actually parse the geometries, vs memory overhead of parsing all objects first to
Wkt
objects and then inferring what type of array builder to use.But I figure that scanning a string for the first instance of
(
and matching those first characters should be very fast, especially if no numeric parsing needs to happen for that first stage.Thoughts?