Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm not sure if I can complete this operation in one step - but someone might be able to help me.

My input file is a csv file with PointID, x, y, z and LineID columns. I'm looking to combine all rows with the same LineID into Polyline25D using OGR2OGR with a virtual datasource (VRT file).

I can get a MultiPoint output, but can't work out how to combine multiple rows (if it's at all possible).

Alternatively, could someone help me with a python script to combine the x, y, z fields into WKT?

Cheers

Input Example :

pointid y x z lineid
1 320589.01 1815258.73 423.78 1
2 320573.49 1815256.71 425.04 1
3 320557.42 1815252.40 425.86 1
4 320541.64 1815248.71 426.19 1
5 320529.37 1815247.01 427.18 1
1 320588.78 1815259.35 423.43 2
2 320573.06 1815257.09 424.66 2
3 320557.00 1815253.09 425.06 2
4 320541.79 1815249.54 425.78 2
5 320529.14 1815247.74 426.22 2
6 320516.78 1815245.02 426.84 2
1 320588.62 1815260.10 423.44 3
2 320572.59 1815258.42 424.65 3
3 320556.21 1815255.29 425.13 3
4 320540.73 1815252.19 425.80 3
5 320529.02 1815248.37 426.20 3

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.