Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RVTD (Medford, OR) -- string length exception #5

Open
fpurcell opened this issue Jan 26, 2021 · 2 comments
Open

RVTD (Medford, OR) -- string length exception #5

fpurcell opened this issue Jan 26, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@fpurcell
Copy link
Member

Building stop-to-stop segments is crapping out on the string geom. Might be stopX - stopX pair.
(Same bug as RTD Denver?)

10:19:36,736 ERROR [/Users/fpurcell/java/DEV/trafficdb/ott/trafficdb/model/stop_segment.py] (psycopg2.errors.InternalError_) geometry requires more points
HINT: "...TRING(-122.869028000 42.323044000)" <-- parse error at position 52 within geometry

[SQL: INSERT INTO rvtd.traffic_stop_segments (id, begin_stop_id, end_stop_id, begin_time, end_time, distance, bearing, direction, shape_id, shape_begin_distance, shape_end_distance, geom) VALUES (%(id)s, %(begin_stop_id)s, %(end_stop_id)s, %(begin_time)s, %(end_time)s, %(distance)s, %(bearing)s, %(direction)s, %(shape_id)s, %(shape_begin_distance)s, %(shape_end_distance)s, ST_GeomFromEWKT(%(geom)s))]
[parameters: ({'id': '9c5d9ba3-937f-48d1-8d95-6e7dd0b22037-790a257e-f30f-4374-a46b-2b3e03bd848d', 'begin_stop_id': '9c5d9ba3-937f-48d1-8d95-6e7dd0b22037', 'end_stop_id': '790a257e-f30f-4374-a46b-2b3e03bd848d', 'begin_time': '10:00:00', 'end_time': '9:42:00', 'distance': 851.9681626752, 'bearing': 127.36949223735762, 'direction': 'SE', 'shape_id': '7253852e-091f-4d7a-ba98-401a3277ecb4', 'shape_begin_distance': 0.0, 'shape_end_distance': 851.9681626752, 'geom': 'SRID=4326;LINESTRING(-122.871538274 42.324461479,-122.870762000 42.323669000,-122.869902126 42.324071218)'}, {'id': '790a257e-f30f-4374-a46b-2b3e03bd848d-3a26c8ff-9b80-4e0a-9ecc-474b63dc2be4', 'begin_stop_id': '790a257e-f30f-4374-a46b-2b3e03bd848d', 'end_stop_id': '3a26c8ff-9b80-4e0a-9ecc-474b63dc2be4', 'begin_time': '10:02:00', 'end_time': '9:43:00', 'distance': 884.0531712979999, 'bearing': 144.49860354518415, 'direction': 'SE', 'shape_id': '7253852e-091f-4d7a-ba98-401a3277ecb4', 'shape_begin_distance': 851.9681626752, 'shape_end_distance': 1736.0213339732, 'geom': 'SRID=4326;LINESTRING(-122.869028000 42.323044000)'},

@fpurcell fpurcell added the bug Something isn't working label Jan 26, 2021
@fpurcell fpurcell self-assigned this Jan 26, 2021
@fpurcell
Copy link
Member Author

VTA has same / similar problem:

11:17:18,489 ERROR [/Users/fpurcell/java/DEV/trafficdb/ott/trafficdb/model/stop_segment.py] (psycopg2.errors.InternalError_) parse error - invalid geometry
HINT: "SRID=4326;LINESTRING()" <-- parse error at position 23 within geometry

[SQL: INSERT INTO vta.traffic_stop_segments (id, begin_stop_id, end_stop_id, begin_time, end_time, distance, bearing, direction, shape_id, shape_begin_distance, shape_end_distance, geom) VALUES (%(id)s, %(begin_stop_id)s, %(end_stop_id)s, %(begin_time)s, %(end_time)s, %(distance)s, %(bearing)s, %(direction)s, %(shape_id)s, %(shape_begin_distance)s, %(shape_end_distance)s, ST_GeomFromEWKT(%(geom)s))]

@fpurcell
Copy link
Member Author

Coded a workaround.
Problem is that conflation is now not very good with workaround / stop to stop 2 point lines.
Better would be to do something more intelligent with querying shapes (like nearest to stop) rather than shape distances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant