1

I have a huge point file (4933873 points, currently in GeoPackage)) looking this way:

point layer in QGIS

imported from a CSV of following structure:

Captured Time,Latitude,Longitude,Value,Unit,Location Name,Device ID,MD5Sum,Height,Surface,Radiation,Uploaded Time,Loader ID
2016-11-04 01:00:07,37.4932,139.93305,38,cpm,,101,e40768be06169b47c412cdbc8b50ee51,,,,2016-11-04 01:00:07.805856,
2016-11-04 01:00:03,37.366713,140.53097,27,celcius,,100079,0654275d9d656aac8f1ee06eaf2ca8d0,462,,,2016-11-04 01:00:03.691745,
2016-11-04 01:00:02,37.366713,140.53097,11,cpm,,100072,b48a5a4b821d04d2071d233d99fc9bf5,462,,,2016-11-04 01:00:03.149019,
2016-11-04 01:00:01,37.366713,140.53097,56,cpm,,100071,654c26d9ad16aa776613db4913a6ee95,462,,,2016-11-04 01:00:01.932265,

And I need to remove those orange / red straight lines (airborne data) and keep the rest (ground measured data - car/walk etc.). Unfortunately there is no altitude so I cannot easily filter it out.

Is there any better way to select consecutive points (after selecting one to begin) without need to load attribute table for a whole layer?

1

I'm assuming that your issue is that opening the attribute table of such a large file can be very slow with so many features. There are two options to remove the red and orange points without opening the attribute table:

Create a new layer with only the blue points

Processing toolbox > Vector Selection > Select by Attribute

According to the layers panel, the orange and red points have values between 507-3034. I'll assume that this is an exact match of the points you want to remove.

Use the select by attributes tool to create a new selection where values < 507.

Right click on the layer name in the layer panel.

  • In QGIS 2.18 and older, choose "save as..." then save it in your desired format. Be sure to check the box next to "save only selected features"

  • In QGIS 3.0 and newer, choose "export > Save selected features as...".


Filter the existing layer instead of creating a new layer

Layer properties > Source > Provider Feature Filter > Query Builder

Substitute the name of your attribute into this expression:

"attributename" < 507

1

Have you tried converting the points to lines and then deleting the long-distance lines? You can do this with the Points to Path tool and then Select by Attributes using the $length attribute.

If you have also long-distance car tracks and are ok with the assumption that planes travel in a straight line while cars don't, you may add an additional clause to your Select by Attributes using the num_points function.

Your selection query would be something like:

$length > 1000 AND num_points($geometry) <= 2

This would select only Polylines longer than 1000 units and containing at most 2 vertices (a straight line).

  • Hi, but there are also many long carborne tracks which I need to keep - probably longer than the arborne ones. It would be a curve - not a straight line like from the airplane but of the same or even bigger length. – Juhele Aug 10 '18 at 9:52
  • Please see my edit. – davibicudo Aug 11 '18 at 10:12
  • If the answer solved your problem, please mark it as accepted. Thanks. – davibicudo Aug 17 '18 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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