2

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:

Rad PROFIL_ID   SP  SWRF99TM_N  SWRF99TM_E  
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.

tobias47n9e
  • 1,231
  • 2
  • 17
  • 35
user27129
  • 61
  • 4

2 Answers2

7

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 ||
.....
CASE WHEN Sp = 999 THEN 'End' 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.


EDIT:

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 ||
CASE WHEN Sp = 999 THEN 'End' ELSE '' END
Sorin Călinică
  • 5,118
  • 1
  • 17
  • 23
  • Nice: The last piece of code could be simplified by using the modulo operator? – tobias47n9e Feb 19 '14 at 20:43
  • 1
    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
3

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:

CASE
    WHEN 'SP' = 1 THEN 'PROFIL_ID' 
END

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):

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

Finding the highest number is probably more complicated.

tobias47n9e
  • 1,231
  • 2
  • 17
  • 35