Open ian-r-rose opened 5 years ago
cc @RMK0110
You're referring to the process_route function in geom_parse.sql?
@RMK0110 Yes, that's right.
@ian-r-rose Is there allowance in terms of consolidating the CREATE TABLE....trips_geos, CREATE FUNCTION...process_route and CREATE FUNCTION...geom_copy parts?
Are you asking about restructuring some of the functions? If so, feel free to take a crack at it and bring that to code review so we can discuss.
If it's a series of bigger changes, feel free to break them into multiple PRs that each express one idea.
We are currently processing route GeoJSON into a LineString. If that GeoJSON contains a single point, we can create an invalid shape (c.f., the GeoJSON schema here, and seemingly the Geos spec somewhere).
We can catch this by filtering by
ST_IsValid
in our queries, but better to not have to do this.