subsample

subsample(gpt_value, gpt_location)

Returns a Geopoints containing the same locations (latitude, longitude and height) as in gpt_location, but whose values are from gpt_value (or a missing value if the point is not found in gpt_value).

Parameters
  • gpt_value (Geopoints) – geopoints defining the values

  • gpt_locations (Geopoints) – geopoints defining the locations

Return type

Geopoints

The resulting Geopoints is sorted in the same way as with geosort(). This means that extra care is needed to perform operations between the results of subsample() and another Geopoints: make sure you call geosort() on the other Geopoints beforehand so that the points could be aligned.

Points with missing latitudes or longitudes will still be in the output, but the rule is that such a point is defined not to be at the same location as another point, even if its lat/lon are also missing. Use remove_missing_values() to get rid of the missing valued points in the returned Geopoints.

Note

It is advised to remove missing lat/lon points using remove_missing_latlons() before using subsample() or geosort().