orb
orb copied to clipboard
fix windows CRLF line endings for wkt.Unmarshal functions
currently wkt.UnmarhsalPolygon works with
POLYGON ((
-0.982 51.941,
-0.982 52.078,
-1.05 52.078,
-1.05 51.941,
-0.982 51.941
))
but if the file is read and passed as it is, line endings are \r\n (on windows) so if you try this will fail, I can not display as it is but above can be written with \n or \r\n line endings
Linux LF endings (works)
"POLYGON ((\n -0.982 51.941,\n -0.982 52.078,\n -1.05 52.078,\n -1.05 51.941,\n -0.982 51.941\n))"
windows CRLF endings (returns an error)
"POLYGON ((\r\n -0.982 51.941,\r\n -0.982 52.078,\r\n -1.05 52.078,\r\n -1.05 51.941,\r\n -0.982 51.941\r\n))"
Note: I can create a fix PR, let me know what you think