MCPcopy Create free account
hub / github.com/LAStools/LAStools / filter

Method filter

LASlib/src/lasfilter.cpp:1984–2001  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1982 inline I32 get_command(CHAR* string) const { return sprintf(string, "-%s %lf ", name(), (time_spacing > 0 ? time_spacing : -time_spacing)); };
1983 inline U32 get_decompress_selective() const { return LASZIP_DECOMPRESS_SELECTIVE_GPS_TIME; };
1984 inline BOOL filter(const LASpoint* point)
1985 {
1986 I64 pos_t = I64_FLOOR(point->get_gps_time() / time_spacing);
1987 my_I64_F64_map::iterator map_element = times.find(pos_t);
1988 if (map_element == times.end())
1989 {
1990 times.insert(my_I64_F64_map::value_type(pos_t, point->get_gps_time()));
1991 return FALSE;
1992 }
1993 else if ((*map_element).second == point->get_gps_time())
1994 {
1995 return FALSE;
1996 }
1997 else
1998 {
1999 return TRUE;
2000 }
2001 }
2002 void reset()
2003 {
2004 times.clear();

Callers

nothing calls this directly

Calls 2

endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected