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

fromWkt should accept any whitespace #24127

Closed
qgib opened this issue Feb 21, 2017 · 2 comments
Closed

fromWkt should accept any whitespace #24127

qgib opened this issue Feb 21, 2017 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@qgib
Copy link
Contributor

qgib commented Feb 21, 2017

Author Name: Mike Taves (Mike Taves)
Original Redmine Issue: 16217
Affected QGIS version: 2.18.3
Redmine category:unknown


This bug was "discovered with the QuickWKT plug-in":https://github.com/elpaso/quickwkt/blob/master/QuickWKT.py#L240 with copy/paste from Excel, which uses tabs delimiters when pasting into a text window. For example, "POINT (180398 5459331)", where the whitespace in between the two values is a tab character, is considered by the QGIS WKT parser as invalid (it is not).

From a QGIS Python console:

1. With space, there are no problems
geom = QgsGeometry.fromWkt("POINT (180398 5459331)")
print(geom is not None)  # True
1. With tab, it does not read the WKT
geom = QgsGeometry.fromWkt("POINT (180398\\t5459331)")
print(geom is not None)  # False

Most other WKT parsers (PostGIS, GEOS, etc.) are more relaxed, and handle any whitespace without issue

(E.g. "SELECT ST_AsEWKT(E'SRID = 123;

POINT
(1\t
3)'::geometry);" works)

@qgib
Copy link
Contributor Author

qgib commented Feb 22, 2017

Author Name: Nyall Dawson (@nyalldawson)


Fixed in changeset "5bbdb1f1c3d07391040b11e7be3b08fe8def0d4c".


  • status_id was changed from Open to Closed

@qgib
Copy link
Contributor Author

qgib commented Sep 22, 2017

Author Name: Jürgen Fischer (@jef-n)


  • category_id was configured as Unknown

@qgib qgib added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label May 25, 2019
@qgib qgib added this to the Future Release - Lower Priority milestone May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

No branches or pull requests

1 participant