Skip to content

Commit

Permalink
Follow up to #190 for render_list (#417)
Browse files Browse the repository at this point in the history
* Fixed `render_list` build needs `libm`
* Added tests
* Updated man page
* Created function to set double
* Cleaned up / optimized a bit
* Removed `--dont-render` option
  • Loading branch information
hummeltech committed Mar 21, 2024
1 parent 3621428 commit 743cf65
Show file tree
Hide file tree
Showing 11 changed files with 376 additions and 101 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,21 @@ find_program(APXS_EXECUTABLE apxs REQUIRED)
include(CheckFunctionExists)
check_function_exists(daemon HAVE_DAEMON)
check_function_exists(getloadavg HAVE_GETLOADAVG)
check_function_exists(pow HAVE_POW)

# Include files
include(CheckIncludeFile)
check_include_file(paths.h HAVE_PATHS_H)
check_include_file(sys/cdefs.h HAVE_SYS_CDEFS_H)
check_include_file(sys/loadavg.h HAVE_SYS_LOADAVG_H)

# Libraries
include(CheckLibraryExists)
if(NOT HAVE_POW)
check_library_exists(m pow "" HAVE_LIB_M)
find_library(MATH_LIBRARY m REQUIRED)
endif()

#-----------------------------------------------------------------------------
#
# Set variables
Expand Down
18 changes: 13 additions & 5 deletions docs/man/render_list.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH RENDER_LIST "1" "2024-03-16" "mod_tile v0.7.1"
.TH RENDER_LIST "1" "2024-03-20" "mod_tile v0.7.1"
.\" Please adjust this date whenever revising the manpage.

.SH NAME
Expand Down Expand Up @@ -75,13 +75,21 @@ If you are using \fB\-a\fR|\-\-all, you can restrict the tile range by adding th
.sp 0
(please note that tile coordinates must be positive integers and are not latitude and longitude values)
.PP
\fB\-x\fR|\-\-min-x=X minimum X tile coordinate
\fB\-g\fR|\-\-min-lat=LATITUDE minimum latitude
.BR
\fB\-X\fR|\-\-max-x=X maximum X tile coordinate
\fB\-G\fR|\-\-max-lat=LATITUDE maximum latitude
.BR
\fB\-y\fR|\-\-min-y=Y minimum Y tile coordinate
\fB\-w\fR|\-\-min-lon=LONGITUDE minimum longitude
.BR
\fB\-Y\fR|\-\-max-y=Y maximum Y tile coordinate
\fB\-W\fR|\-\-max-lon=LONGITUDE maximum longitude
.BR
\fB\-x\fR|\-\-min-x=X minimum X tile coordinate
.BR
\fB\-X\fR|\-\-max-x=X maximum X tile coordinate
.BR
\fB\-y\fR|\-\-min-y=Y minimum Y tile coordinate
.BR
\fB\-Y\fR|\-\-max-y=Y maximum Y tile coordinate
.PP
Without \fB\-a\fR|\-\-all, send a list of tiles to be rendered from STDIN in the format:
.BR
Expand Down
1 change: 1 addition & 0 deletions includes/renderd_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ renderd_config config;
renderd_config config_slaves[MAX_SLAVES];
xmlconfigitem maps[XMLCONFIGS_MAX];

double min_max_double_opt(const char *opt_arg, const char *opt_type_name, double minimum, double maximum);
int min_max_int_opt(const char *opt_arg, const char *opt_type_name, int minimum, int maximum);
void free_map_section(xmlconfigitem map_section);
void free_map_sections(xmlconfigitem *map_sections);
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ set(COMMON_SRCS
)
set(COMMON_LIBRARIES
${GLIB_LIBRARIES}
${MATH_LIBRARY}
Threads::Threads
)

Expand Down
Loading

0 comments on commit 743cf65

Please sign in to comment.