Opened 16 years ago

Closed 9 years ago

Last modified 9 years ago

#2620 closed enhancement (worksforme)

PolylineFromColumns patch

Reported by: skinkie Owned by: warmerdam
Priority: normal Milestone:
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords: polyline, non-spational, linestring, multilinestring
Cc:

Description

This patch allows any non-spational database to produce linestrings from an aggregated function. The output from the database must(!) be sorted.

Usage: http://kinkrsoftware.nl/contrib/osm/motorway.ovf

Original/Latest patch: http://kinkrsoftware.nl/contrib/gdal/gdal-polylinepatch.diff

Attachments (1)

gdal-polylinepatch.diff (5.3 KB ) - added by skinkie 16 years ago.

Download all attachments as: .zip

Change History (6)

by skinkie, 16 years ago

Attachment: gdal-polylinepatch.diff added

comment:1 by Jukka Rahkonen, 9 years ago

The patch has not been applied or commented yet during these 7 years.

comment:2 by Kyle Shannon, 9 years ago

Component: OGR_SRSOGR_SF

comment:3 by Even Rouault, 9 years ago

I'm not sure this is really necessary

Consider points.csv : pt_id,way_id,x,y 1,1,2,49 2,1,3,50 1,2,-2,49 2,2,-3,50

Then with spatialite MakeLine() aggregate :

ogrinfo points.csv -sql "select way_id, makeline(makepoint(cast(x as float),cast(y as float))) from points group by way_id" -dialect sqlite

OGRFeature(SELECT):0
  way_id (String) = 1
  LINESTRING (2 49,3 50)

OGRFeature(SELECT):1
  way_id (String) = 2
  LINESTRING (-2 49,-3 50)

comment:4 by Kyle Shannon, 9 years ago

Resolution: worksforme
Status: newclosed

That's good enough for me, I was just purging some OGR_SRS tickets. I will close, can be re-opened if need be.

comment:5 by Even Rouault, 9 years ago

r29626 "CSV doc: add example how to build a LineString from a series of points (#2620)"

Note: See TracTickets for help on using tickets.