Skip to content

Commit

Permalink
Feature #3012 ugrid for 3D points (PointXYZ) (#3035)
Browse files Browse the repository at this point in the history
* #3012 Initial release

* #3012 Added search_3d_kdtree.cc

* #3012 Initial release

* #3012 Added check_llh_to_ecef and test_llh_to_ecef

* #3012Added search_3d_kdtree_api

* #3012 Reanmed point_lonlat to points_lonlat. Added points_XYZ & points_XYZ_km

* #3012 Compare points_XYZ or points_latlon

* #3012 Commented out latlonalt_to_xy & xy_to_latlonalt

* #3012 Reanmed point_lonlat to points_lonlat. Added points_XYZ & points_XYZ_km. Added llh_to_ecef APIs

* Per #3012, update the .gitignore settings to ignore the newly created test executables in the test_util/libcode/vx_grid directory.

* Per #3012, changes to the vx_grid library to address SonarQube code smells in New Code and hopefully reduce the Overall number of code smells.

* Per #3012, couple more minor SonarQube tweaks

---------

Co-authored-by: Howard Soh <[email protected]>
Co-authored-by: MET Tools Test Account <[email protected]>
  • Loading branch information
3 people authored Dec 13, 2024
1 parent eb0957b commit c7e4345
Show file tree
Hide file tree
Showing 9 changed files with 1,040 additions and 95 deletions.
2 changes: 2 additions & 0 deletions internal/test_util/libcode/vx_grid/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
test_grid_area
search_3d_kdtree
search_3d_kdtree_api
*.o
*.a
.deps
Expand Down
39 changes: 38 additions & 1 deletion internal/test_util/libcode/vx_grid/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ include ${top_srcdir}/Make-include

# Test programs

noinst_PROGRAMS = test_grid_area
noinst_PROGRAMS = test_grid_area \
search_3d_kdtree \
search_3d_kdtree_api

test_grid_area_SOURCES = test_grid_area.cc
test_grid_area_CPPFLAGS = ${MET_CPPFLAGS}
Expand All @@ -27,3 +29,38 @@ test_grid_area_LDADD = \
-lvx_log \
$(UGRID_DEP_LIBS) \
-lz -lm -lproj

search_3d_kdtree_SOURCES = search_3d_kdtree.cc
search_3d_kdtree_CPPFLAGS = ${MET_CPPFLAGS}
search_3d_kdtree_LDFLAGS = -L. ${MET_LDFLAGS}
search_3d_kdtree_LDADD = \
$(UGRID_MET_LIBS) \
-lvx_nc_util \
-lvx_geodesy \
-lvx_nav \
-lvx_util_math \
-lvx_util \
-lvx_math \
-lvx_cal \
-lvx_log \
$(UGRID_DEP_LIBS) \
-lz -lm -lproj \
-lnetcdf_c++4 -lnetcdf

search_3d_kdtree_api_SOURCES = search_3d_kdtree_api.cc
search_3d_kdtree_api_CPPFLAGS = ${MET_CPPFLAGS}
search_3d_kdtree_api_LDFLAGS = -L. ${MET_LDFLAGS}
search_3d_kdtree_api_LDADD = \
$(UGRID_MET_LIBS) \
-lvx_nc_util \
-lvx_grid \
-lvx_geodesy \
-lvx_nav \
-lvx_util_math \
-lvx_util \
-lvx_math \
-lvx_cal \
-lvx_log \
$(UGRID_DEP_LIBS) \
-lz -lm -lproj \
-lnetcdf_c++4 -lnetcdf
111 changes: 104 additions & 7 deletions internal/test_util/libcode/vx_grid/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
noinst_PROGRAMS = test_grid_area$(EXEEXT)
noinst_PROGRAMS = test_grid_area$(EXEEXT) search_3d_kdtree$(EXEEXT) \
search_3d_kdtree_api$(EXEEXT)
subdir = internal/test_util/libcode/vx_grid
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
Expand All @@ -100,9 +101,23 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
PROGRAMS = $(noinst_PROGRAMS)
am_search_3d_kdtree_OBJECTS = \
search_3d_kdtree-search_3d_kdtree.$(OBJEXT)
search_3d_kdtree_OBJECTS = $(am_search_3d_kdtree_OBJECTS)
am__DEPENDENCIES_1 =
search_3d_kdtree_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
search_3d_kdtree_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(search_3d_kdtree_LDFLAGS) $(LDFLAGS) -o $@
am_search_3d_kdtree_api_OBJECTS = \
search_3d_kdtree_api-search_3d_kdtree_api.$(OBJEXT)
search_3d_kdtree_api_OBJECTS = $(am_search_3d_kdtree_api_OBJECTS)
search_3d_kdtree_api_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
search_3d_kdtree_api_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(search_3d_kdtree_api_LDFLAGS) $(LDFLAGS) -o $@
am_test_grid_area_OBJECTS = test_grid_area-test_grid_area.$(OBJEXT)
test_grid_area_OBJECTS = $(am_test_grid_area_OBJECTS)
am__DEPENDENCIES_1 =
test_grid_area_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
test_grid_area_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
Expand All @@ -122,7 +137,10 @@ am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__maybe_remake_depfiles = depfiles
am__depfiles_remade = ./$(DEPDIR)/test_grid_area-test_grid_area.Po
am__depfiles_remade = \
./$(DEPDIR)/search_3d_kdtree-search_3d_kdtree.Po \
./$(DEPDIR)/search_3d_kdtree_api-search_3d_kdtree_api.Po \
./$(DEPDIR)/test_grid_area-test_grid_area.Po
am__mv = mv -f
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
Expand All @@ -141,8 +159,10 @@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
am__v_CXXLD_0 = @echo " CXXLD " $@;
am__v_CXXLD_1 =
SOURCES = $(test_grid_area_SOURCES)
DIST_SOURCES = $(test_grid_area_SOURCES)
SOURCES = $(search_3d_kdtree_SOURCES) $(search_3d_kdtree_api_SOURCES) \
$(test_grid_area_SOURCES)
DIST_SOURCES = $(search_3d_kdtree_SOURCES) \
$(search_3d_kdtree_api_SOURCES) $(test_grid_area_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
Expand Down Expand Up @@ -343,6 +363,41 @@ test_grid_area_LDADD = \
$(UGRID_DEP_LIBS) \
-lz -lm -lproj

search_3d_kdtree_SOURCES = search_3d_kdtree.cc
search_3d_kdtree_CPPFLAGS = ${MET_CPPFLAGS}
search_3d_kdtree_LDFLAGS = -L. ${MET_LDFLAGS}
search_3d_kdtree_LDADD = \
$(UGRID_MET_LIBS) \
-lvx_nc_util \
-lvx_geodesy \
-lvx_nav \
-lvx_util_math \
-lvx_util \
-lvx_math \
-lvx_cal \
-lvx_log \
$(UGRID_DEP_LIBS) \
-lz -lm -lproj \
-lnetcdf_c++4 -lnetcdf

search_3d_kdtree_api_SOURCES = search_3d_kdtree_api.cc
search_3d_kdtree_api_CPPFLAGS = ${MET_CPPFLAGS}
search_3d_kdtree_api_LDFLAGS = -L. ${MET_LDFLAGS}
search_3d_kdtree_api_LDADD = \
$(UGRID_MET_LIBS) \
-lvx_nc_util \
-lvx_grid \
-lvx_geodesy \
-lvx_nav \
-lvx_util_math \
-lvx_util \
-lvx_math \
-lvx_cal \
-lvx_log \
$(UGRID_DEP_LIBS) \
-lz -lm -lproj \
-lnetcdf_c++4 -lnetcdf

all: all-am

.SUFFIXES:
Expand Down Expand Up @@ -380,6 +435,14 @@ $(am__aclocal_m4_deps):
clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)

search_3d_kdtree$(EXEEXT): $(search_3d_kdtree_OBJECTS) $(search_3d_kdtree_DEPENDENCIES) $(EXTRA_search_3d_kdtree_DEPENDENCIES)
@rm -f search_3d_kdtree$(EXEEXT)
$(AM_V_CXXLD)$(search_3d_kdtree_LINK) $(search_3d_kdtree_OBJECTS) $(search_3d_kdtree_LDADD) $(LIBS)

search_3d_kdtree_api$(EXEEXT): $(search_3d_kdtree_api_OBJECTS) $(search_3d_kdtree_api_DEPENDENCIES) $(EXTRA_search_3d_kdtree_api_DEPENDENCIES)
@rm -f search_3d_kdtree_api$(EXEEXT)
$(AM_V_CXXLD)$(search_3d_kdtree_api_LINK) $(search_3d_kdtree_api_OBJECTS) $(search_3d_kdtree_api_LDADD) $(LIBS)

test_grid_area$(EXEEXT): $(test_grid_area_OBJECTS) $(test_grid_area_DEPENDENCIES) $(EXTRA_test_grid_area_DEPENDENCIES)
@rm -f test_grid_area$(EXEEXT)
$(AM_V_CXXLD)$(test_grid_area_LINK) $(test_grid_area_OBJECTS) $(test_grid_area_LDADD) $(LIBS)
Expand All @@ -390,6 +453,8 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/search_3d_kdtree-search_3d_kdtree.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/search_3d_kdtree_api-search_3d_kdtree_api.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_grid_area-test_grid_area.Po@am__quote@ # am--include-marker

$(am__depfiles_remade):
Expand All @@ -412,6 +477,34 @@ am--depfiles: $(am__depfiles_remade)
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`

search_3d_kdtree-search_3d_kdtree.o: search_3d_kdtree.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_3d_kdtree_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT search_3d_kdtree-search_3d_kdtree.o -MD -MP -MF $(DEPDIR)/search_3d_kdtree-search_3d_kdtree.Tpo -c -o search_3d_kdtree-search_3d_kdtree.o `test -f 'search_3d_kdtree.cc' || echo '$(srcdir)/'`search_3d_kdtree.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/search_3d_kdtree-search_3d_kdtree.Tpo $(DEPDIR)/search_3d_kdtree-search_3d_kdtree.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='search_3d_kdtree.cc' object='search_3d_kdtree-search_3d_kdtree.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_3d_kdtree_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o search_3d_kdtree-search_3d_kdtree.o `test -f 'search_3d_kdtree.cc' || echo '$(srcdir)/'`search_3d_kdtree.cc

search_3d_kdtree-search_3d_kdtree.obj: search_3d_kdtree.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_3d_kdtree_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT search_3d_kdtree-search_3d_kdtree.obj -MD -MP -MF $(DEPDIR)/search_3d_kdtree-search_3d_kdtree.Tpo -c -o search_3d_kdtree-search_3d_kdtree.obj `if test -f 'search_3d_kdtree.cc'; then $(CYGPATH_W) 'search_3d_kdtree.cc'; else $(CYGPATH_W) '$(srcdir)/search_3d_kdtree.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/search_3d_kdtree-search_3d_kdtree.Tpo $(DEPDIR)/search_3d_kdtree-search_3d_kdtree.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='search_3d_kdtree.cc' object='search_3d_kdtree-search_3d_kdtree.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_3d_kdtree_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o search_3d_kdtree-search_3d_kdtree.obj `if test -f 'search_3d_kdtree.cc'; then $(CYGPATH_W) 'search_3d_kdtree.cc'; else $(CYGPATH_W) '$(srcdir)/search_3d_kdtree.cc'; fi`

search_3d_kdtree_api-search_3d_kdtree_api.o: search_3d_kdtree_api.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_3d_kdtree_api_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT search_3d_kdtree_api-search_3d_kdtree_api.o -MD -MP -MF $(DEPDIR)/search_3d_kdtree_api-search_3d_kdtree_api.Tpo -c -o search_3d_kdtree_api-search_3d_kdtree_api.o `test -f 'search_3d_kdtree_api.cc' || echo '$(srcdir)/'`search_3d_kdtree_api.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/search_3d_kdtree_api-search_3d_kdtree_api.Tpo $(DEPDIR)/search_3d_kdtree_api-search_3d_kdtree_api.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='search_3d_kdtree_api.cc' object='search_3d_kdtree_api-search_3d_kdtree_api.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_3d_kdtree_api_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o search_3d_kdtree_api-search_3d_kdtree_api.o `test -f 'search_3d_kdtree_api.cc' || echo '$(srcdir)/'`search_3d_kdtree_api.cc

search_3d_kdtree_api-search_3d_kdtree_api.obj: search_3d_kdtree_api.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_3d_kdtree_api_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT search_3d_kdtree_api-search_3d_kdtree_api.obj -MD -MP -MF $(DEPDIR)/search_3d_kdtree_api-search_3d_kdtree_api.Tpo -c -o search_3d_kdtree_api-search_3d_kdtree_api.obj `if test -f 'search_3d_kdtree_api.cc'; then $(CYGPATH_W) 'search_3d_kdtree_api.cc'; else $(CYGPATH_W) '$(srcdir)/search_3d_kdtree_api.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/search_3d_kdtree_api-search_3d_kdtree_api.Tpo $(DEPDIR)/search_3d_kdtree_api-search_3d_kdtree_api.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='search_3d_kdtree_api.cc' object='search_3d_kdtree_api-search_3d_kdtree_api.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_3d_kdtree_api_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o search_3d_kdtree_api-search_3d_kdtree_api.obj `if test -f 'search_3d_kdtree_api.cc'; then $(CYGPATH_W) 'search_3d_kdtree_api.cc'; else $(CYGPATH_W) '$(srcdir)/search_3d_kdtree_api.cc'; fi`

test_grid_area-test_grid_area.o: test_grid_area.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_grid_area_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test_grid_area-test_grid_area.o -MD -MP -MF $(DEPDIR)/test_grid_area-test_grid_area.Tpo -c -o test_grid_area-test_grid_area.o `test -f 'test_grid_area.cc' || echo '$(srcdir)/'`test_grid_area.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_grid_area-test_grid_area.Tpo $(DEPDIR)/test_grid_area-test_grid_area.Po
Expand Down Expand Up @@ -550,7 +643,9 @@ clean: clean-am
clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am

distclean: distclean-am
-rm -f ./$(DEPDIR)/test_grid_area-test_grid_area.Po
-rm -f ./$(DEPDIR)/search_3d_kdtree-search_3d_kdtree.Po
-rm -f ./$(DEPDIR)/search_3d_kdtree_api-search_3d_kdtree_api.Po
-rm -f ./$(DEPDIR)/test_grid_area-test_grid_area.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
Expand Down Expand Up @@ -596,7 +691,9 @@ install-ps-am:
installcheck-am:

maintainer-clean: maintainer-clean-am
-rm -f ./$(DEPDIR)/test_grid_area-test_grid_area.Po
-rm -f ./$(DEPDIR)/search_3d_kdtree-search_3d_kdtree.Po
-rm -f ./$(DEPDIR)/search_3d_kdtree_api-search_3d_kdtree_api.Po
-rm -f ./$(DEPDIR)/test_grid_area-test_grid_area.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

Expand Down
Loading

0 comments on commit c7e4345

Please sign in to comment.