Feature request #11695

Python parser for geometries in delimited text layers

Added by Joshua Arnott over 9 years ago. Updated almost 7 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Data Provider/Delimited Text
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:19939

Description

Currently delimited text layers support three options for geometries:
  1. Point coordinates (X and Y fields, optionally in DMS)
  2. Well Known Text (WKT)
  3. No geometry (attribute table only)

It is common in the United Kingdom to receive coordinates which use the British National Grid system.

http://en.wikipedia.org/wiki/Ordnance_Survey_National_Grid

For example, SP513061 is interpreted as x=451300, y=206100. It's relatively easy to do this conversion using a bit of Python:

http://snorf.net/blog/2014/08/12/converting-british-national-grid-and-irish-grid-references/

My proposal is for a 4th geometry option in the delimited text layer, that could pass a field or fields to a user-editable Python function, which would return either the x,y coordinates, or even a geometry object. Ireland has a similar grid system, so it would also be useful there, but I'm sure users could find even more interesting/obscure uses for this.

Of course, this could be written as an individual plugin, but it would involve significant duplication of existing functionality already in the delimited text layer feature.

History

#1 Updated by Nathan Woodrow over 9 years ago

  • Target version set to Future Release - Nice to have

Now that is a nifty idea indeed.

#2 Updated by Giovanni Manghi almost 7 years ago

  • Easy fix? set to No

Also available in: Atom PDF