WKTFileReader

26 views
Skip to first unread message

Walt Speelman

unread,
Nov 9, 2020, 9:45:02 PM11/9/20
to NetTopologySuite
Hi,

I was updating some old code that used version 1.13.3.2 to a dotnet core / standard app.  I had a WktFileReader that would process all the records (one per line) in a file.  It does not seem to have this behaviour any more and my integration test is failing because it only reads the first WKT geometry.

Was this an intended change?  Or was this always supposed to be the case but it wasn't failing before?

I haven't followed the code past the WKTReader tokenizer to determine where the not reading multiple files is happening.

Any thoughts on this would be appreciated.

Cheers,

:w

Diego Guidi

unread,
Nov 10, 2020, 1:20:34 AM11/10/20
to NetTopologySuite
looks more a bug or something unexpected due to your input to me.
please post the code you wrote and the data (or a valid sample data that reproduces the behaviour) to https://github.com/NetTopologySuite/NetTopologySuite/issues

Walt Speelman

unread,
Nov 10, 2020, 8:07:54 AM11/10/20
to NetTopologySuite
Awesome - I tried to create a simple example and discovered the problem, the new reader requires a comma between the WKT geometries, where as the old one only required an end-of-line. I cannot find that in the WKT definition.

Anyway I can modify my WKT generation to accommodate the change.

If you think it's a defect let me know and I'll post some content to the issues.

Cheers,

:w

Diego Guidi

unread,
Nov 10, 2020, 8:50:27 AM11/10/20
to NetTopologySuite
non easy for me to understand your problem because WKT actually doesn't specify how to separate different geometries, but only to format a single geometry (I think)
maybe you can post sample data and your code to see what happens, not clear for me if you discovered a regression or it's some kind of weird behaviour in your code

Walt Speelman

unread,
Nov 10, 2020, 9:15:50 AM11/10/20
to NetTopologySuite
I've thrown a simple example up here:


You are correct, WKT does not specify how to separate multiple geometries explicitly, however, the inclusion of the required comma is not covered, and is a change from previous net topology suite behaviour.
Reply all
Reply to author
Forward
0 new messages