This is a demo of an API I'd like to be able to use with geozero to do more kinds of processing with the library.
Currently, it seems like processing is usually limited to "input -> output", which works great for converting formats and for some kinds of processing:
let wkt = WktStr("POINT (4760096.421921 3744293.729449)");
wkt
.to_json()
.unwrap()
But often I want to do some kind of pipeline of operations. One such example here:
read geometry from some input format
project the geometries
write to some output format (maybe the same as input)
let from = "EPSG:2230";
let to = "EPSG:26946";
let proj = Proj::new_known_crs(from, to, None).unwrap();
let wkt = WktStr("POINT (4760096.421921 3744293.729449)");
wkt
.to_projected(proj)
.to_json()
.unwrap());
I personally think the user facing API is pretty good - but implementing it has some problems that I'll highlight below.
I'm currently experimenting with a new event based API, which should support chaining of processors. Other advantages of an event stream would be serializing and buffering.
This is a demo of an API I'd like to be able to use with geozero to do more kinds of processing with the library.
Currently, it seems like processing is usually limited to "input -> output", which works great for converting formats and for some kinds of processing:
But often I want to do some kind of pipeline of operations. One such example here:
I personally think the user facing API is pretty good - but implementing it has some problems that I'll highlight below.