Skip to content

Commit

Permalink
Updated to use a JSON index file to speed restarts
Browse files Browse the repository at this point in the history
Also reduced usage of shared_ptr which iOS and Mac Catalyst builds struggled
with
  • Loading branch information
frankdean committed Feb 25, 2025
1 parent 4b1a747 commit 9e7fadd
Show file tree
Hide file tree
Showing 15 changed files with 707 additions and 177 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@
/tests/testsuite.log
/trip-*.sha256sums
/trip-*.tar.?z
/trip-*.tar.?z.asc
/trip-*.tar.bz2
/trip-*.tar.sha256sums
/trip-*.tar.zst
/trip-*.zip
/trip-*.zip.asc
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
## 2.5.3

- Support loading elevation tiles directly from zip files.
- Uses a JSON file to maintain an index of tiles to increase startup speed.
The location of the index file must be writable, defaulting to
`.tile-index.json` in the tiles folder. Can be configured using the
`datasetDirIndex` setting in `trip-server.yaml`. See
`conf/trip-server-dist.yaml` in the source tree.

## 2.5.2

Expand Down
4 changes: 4 additions & 0 deletions RELEASE_PROCEDURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@

1. Create SHA256 sums for the tarballs

1. Sign the tarballs:

gpg --sign --detach-sign --armor $TARBALL

1. Copy the tarballs to the download site

1. Build PDF and HTML docs
Expand Down
1 change: 1 addition & 0 deletions conf/trip-server-dist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ db:
elevation-local-disabled:
tileCacheMs: 60000
datasetDir: ./elevation-data/
datasetDirIndex: ./elevation-data/.tile-index.json
elevation-remote-disabled:
provider:
userAgentInfo: (mailto:[email protected])
Expand Down
15 changes: 12 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ AM_CONDITIONAL([USE_CAIRO], [test x$use_cairo = xyes])
if test "x${use_gdal}" = xyes; then
PKG_CHECK_MODULES([LIBGDAL], [gdal >= 3.2.2])
AC_DEFINE([HAVE_GDAL], [1], [Build to use GDAL library])
PKG_CHECK_MODULES([LIBPROJ], [proj >= 9.0.0],
[AC_DEFINE([HAVE_PROJ], [1], [Build to use PROJ library])],
[AC_MSG_RESULT([${LIBPROJ_PKG_ERRORS} - will not set PROJ search path for proj.db])])
dnl GDAL_SYSTEM='elevation_tile.$(OBJEXT)'
dnl AC_SUBST([GDAL_SYSTEM])
fi
Expand Down Expand Up @@ -150,9 +153,9 @@ if test "x${use_keep_alive}" == xyes; then
AC_DEFINE([ENABLE_KEEP_ALIVE], [1], [Enable HTTP keep alive])
fi

CXXFLAGS="${CXXFLAGS} -Wno-deprecated-declarations ${LIBPQXX_CFLAGS} ${LIBYAML_CFLAGS} ${LIBUUID_CFLAGS} ${BOOST_CPPFLAGS} ${LIBPUGIXML_CFLAGS} ${LIBGDAL_CFLAGS} ${LIBCAIROMM_CFLAGS} ${LIBCMARK_CFLAGS} ${FINALCUT_CFLAGS}"
CXXFLAGS="${CXXFLAGS} -Wno-deprecated-declarations ${LIBPQXX_CFLAGS} ${LIBYAML_CFLAGS} ${LIBUUID_CFLAGS} ${BOOST_CPPFLAGS} ${LIBPUGIXML_CFLAGS} ${LIBGDAL_CFLAGS} ${LIBPROJ_CFLAGS} ${LIBCAIROMM_CFLAGS} ${LIBCMARK_CFLAGS} ${FINALCUT_CFLAGS}"
dnl CPPFLAGS="${CPPFLAGS} ${XXXXXX_CPPFLAGS}"
LIBS="${LIBS} ${LIBPQXX_LIBS} ${LIBYAML_LIBS} ${LIBUUID_LIBS} ${BOOST_LDFLAGS} ${BOOST_LOCALE_LIB} ${LIBPUGIXML_LIBS} ${LIBGDAL_LIBS} ${LIBCAIROMM_LIBS} ${LIBCMARK_LIBS} ${FINALCUT_LIBS}"
LIBS="${LIBS} ${LIBPQXX_LIBS} ${LIBYAML_LIBS} ${LIBUUID_LIBS} ${BOOST_LDFLAGS} ${BOOST_LOCALE_LIB} ${LIBPUGIXML_LIBS} ${LIBGDAL_LIBS} ${LIBPROJ_LIBS} ${LIBCAIROMM_LIBS} ${LIBCMARK_LIBS} ${FINALCUT_LIBS}"

# Checks for header files.
dnl echo "Host_os: ${host_os}"
Expand All @@ -179,9 +182,13 @@ case $host in
*)
esac
dnl AC_CHECK_HEADERS([getopt.h uuid/uuid.h ossp/uuid.h])
AC_CHECK_HEADERS([getopt.h])
dnl
dnl The presence of TargetConditionals.h indicates we're probably building
dnl using Xcode SDK so we can compile differently for macOS and iOS targets.
AC_CHECK_HEADERS([getopt.h TargetConditionals.h])
AC_CHECK_HEADERS([nlohmann/json.hpp],,
[AC_MSG_ERROR([nlohmann/json.hpp not found. Please install the nlohmann-json package.])])
AC_CHECK_HEADERS([thread])

# Check if the version of libuuid supports the uuid_generate_time_safe method
if test "x${have_libuuid}" = xyes; then
Expand Down Expand Up @@ -233,6 +240,8 @@ AC_DEFINE_UNQUOTED([OLC_VERSION], ["${OLC_VERSION}"], [The version of Open Locat
AC_SUBST([ZXCVBN_VERSION])
AC_DEFINE_UNQUOTED([ZXCVBN_VERSION], ["${ZXCVBN_VERSION}"], [The version of zxcvbn])

AC_DEFINE([BUILD_FOR_IOS], [0], "Build for an iOS target")

AC_CONFIG_FILES([Makefile po/Makefile.in
doc/Makefile
src/Makefile
Expand Down
5 changes: 2 additions & 3 deletions po/en_GB.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: trip 2.0.0\n"
"Report-Msgid-Bugs-To: Frank Dean <[email protected]>\n"
"POT-Creation-Date: 2025-01-17 16:15+0000\n"
"POT-Creation-Date: 2025-02-25 18:09+0000\n"
"PO-Revision-Date: 2023-12-17 17:34+0000\n"
"Last-Translator: Frank Dean <[email protected]>\n"
"Language-Team: English (British) <(nothing)>\n"
Expand Down Expand Up @@ -322,8 +322,7 @@ msgstr "New"
msgid "User Management"
msgstr "User Management"

#. Message displayed after loading elevation tiles
#: src/elevation_tile.cpp:267
#: src/elevation_tile.cpp:466
#, c++-format
msgid "Loaded {1} elevation tiles in {2} ms"
msgstr "Loaded {1} elevation tiles in {2} ms"
Expand Down
5 changes: 2 additions & 3 deletions po/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: trip 2.0.0\n"
"Report-Msgid-Bugs-To: Frank Dean <[email protected]>\n"
"POT-Creation-Date: 2025-01-17 16:15+0000\n"
"POT-Creation-Date: 2025-02-25 18:09+0000\n"
"PO-Revision-Date: 2023-12-17 18:19+0000\n"
"Last-Translator: Frank Dean <[email protected]>\n"
"Language-Team: Spanish <[email protected]>\n"
Expand Down Expand Up @@ -314,8 +314,7 @@ msgstr ""
msgid "User Management"
msgstr ""

#. Message displayed after loading elevation tiles
#: src/elevation_tile.cpp:267
#: src/elevation_tile.cpp:466
#, c++-format
msgid "Loaded {1} elevation tiles in {2} ms"
msgstr ""
Expand Down
5 changes: 2 additions & 3 deletions po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: trip 2.0.0\n"
"Report-Msgid-Bugs-To: Frank Dean <[email protected]>\n"
"POT-Creation-Date: 2025-01-17 16:15+0000\n"
"POT-Creation-Date: 2025-02-25 18:09+0000\n"
"PO-Revision-Date: 2023-12-17 18:37+0000\n"
"Last-Translator: Frank Dean <[email protected]>\n"
"Language-Team: French <[email protected]>\n"
Expand Down Expand Up @@ -313,8 +313,7 @@ msgstr ""
msgid "User Management"
msgstr ""

#. Message displayed after loading elevation tiles
#: src/elevation_tile.cpp:267
#: src/elevation_tile.cpp:466
#, c++-format
msgid "Loaded {1} elevation tiles in {2} ms"
msgstr ""
Expand Down
Loading

0 comments on commit 9e7fadd

Please sign in to comment.