qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.52k stars 2.99k forks source link

Python parser for geometries in delimited text layers #19939

Open qgib opened 9 years ago

qgib commented 9 years ago

Author Name: Joshua Arnott (@snorfalorpagus) Original Redmine Issue: 11695

Redmine category:data_provider/delimitedtext


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.

qgib commented 9 years ago

Author Name: Nathan Woodrow (@NathanW2)


Now that is a nifty idea indeed.


qgib commented 7 years ago

Author Name: Giovanni Manghi (@gioman)