Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wish to display land seismic lines on a map. Land seismic lines are often not straight so often there is survey data for each shotpoint or every 5 shotpoints. Typically a shotpoint (SP) could be 25m or 50m apart. There are often many hundreds of SPs. The TDL loads as discrete points. I need to be able to identify the seismic line (that is in the TDL file) and also say every 100 SP.

I cannot find a way to label SPs every 100 points, or to just label the line at the start and end.

A typical file looks like:

1   MC-81-313E  4   6414971 735192  6414387 1687468  
2   MC-81-313E  5   6414988 735192  6414404 1687468
3   MC-81-313E  6   6415004 735192  6414420 1687468
4   MC-81-313E  7   6415020 735192  6414436 1687468

PROFIL_ID = Line number, SP is Shotpoint and the other 2 columns are XY coordinates.

share|improve this question
Can you add more info on your table? What does "Rad" mean? – tobias47n9e Feb 19 '14 at 19:11
Not sure what Rad means - it is just some sequential number by the file creator and is not relevant. – user27129 Feb 20 '14 at 20:08

Is this what you want to achieve (at least for your sample data)?

enter image description here

The shotpoints layer is labeled with this expression:

enter image description here

The seismic_line layer is generated by the Points to Path plugin:

enter image description here

using the following parameters:

enter image description here

The generated attribute table for this layer is bellow:

enter image description here

and the layer is labeled using this expression:

enter image description here

Of course, when you have a long seismic line with hundreds of points, you could label the first layer like this:

CASE WHEN Sp = 1 THEN 'Start' ELSE '' END ||
CASE WHEN Sp = 100 THEN '100' ELSE '' END ||
CASE WHEN Sp = 200 THEN '200' ELSE '' END ||

I've showed you this technique to help you easily identify the seismic lines, not only with discrete points, but also with lines.


The last code could be simplified using the modulo operator, as showed Spießbürger in his answer:

CASE WHEN Sp = 1 THEN 'Start' ELSE '' END ||
CASE WHEN Sp % 100 = 0 THEN Sp ELSE '' END ||
share|improve this answer
Nice: The last piece of code could be simplified by using the modulo operator? – tobias47n9e Feb 19 '14 at 20:43
You are right, this code could be simplified using the modulo operator, as you already showed in your response! Good point! – Sorin Călinică Feb 19 '14 at 20:53
Thanks very much - it looks a neat solution and I will give it a go. – user27129 Feb 20 '14 at 20:10
Sorin, I have been using your suggested method for display. However, when I now use Points to Path converter the input data headers, e.g. Profil_ID, SP, etc are converted to Group, begin, end. This means I do not see the information you mention when writing the expression, e.g. CASE WHEN Sp = 1 THEN 'Start' ELSE '' END ||. Has something happened in the upgrades to Points to Path? Thanks – user27129 Aug 14 '14 at 13:13

Labeling the beginning of the line can be done by only labelling when the shotpoint-number is 1. This can be done in the "layer-preferces --> labelling --> and pressing the epsilon at the very top" and entering:


You can also use a similar argument to find every 100th point with the modulo operator (%). The modulo operator will give you the integer rest of a division (110/100 is 1 and 10 rest and therefore not zero, 100/100 is 1 and 0 rest, therefore label it):

    WHEN "SP" = 1 OR "SP" % 100 = 0 THEN  "PROFIL_ID" 

Finding the highest number is probably more complicated.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.