to save up space on the SDcard, oruxmaps could support reading
It may not be relevant, but the SRTMGHGT driver from
thanks again, this software is awesome.
yip
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
rem
rem TIF 2 HGT
rem
rem Purpose: convert TIF DEM into HGT DEM files (Digital Elevation Model)
rem
rem Usage: Drag&Drop multiple TIFs file on this script (but NO directory!)
rem
rem Prerequisites : GDAL utilities and a bit of configuration below
rem warning : no error checking !
rem warning : AVOID whitespaces/specialchars in filenames AND working paths
rem author: yip 15 june 2016
@echo off
setlocal enableextensions enabledelayedexpansion
rem CONFIGURATION
set gdalpath="c:Program FilesGDAL"
rem END CONFIG
rem should not be changed. HGT is almost always this size. only deal with square HGTs. I don't know about poles.
set hgtsize=3600
rem dirty hack for the FOR loops
set /A hgtone=%hgtsize%+1
rem only for displaying progress
for %%z in (%*) do set /A totalfiles+=1
rem MAIN LOOP
rem process each drag&dropped file
for %%F in (%*) do (
set /A currentfile+=1
echo ========Processing [%%~nxF]========
echo [Phase 0] Get info about the TIF with GDAL ...
rem get the size of the tif (eg. 18000x18000)
%gdalpath%gdalinfo.exe %%F | findstr /c:"Size is" > tempdem.out
set /p tifsize=<tempdem.out
for /f "tokens=3,4 delims=, " %%g in (tempdem.out) do (
set xtifsize=%%g & set /A xmax=%%g-2
set ytifsize=%%h & set /A ymax=%%h-2
)
set /A totalsize= !xtifsize! / %hgtsize% * !ytifsize! / %hgtsize%
rem loop for each row of that TIFF
for /l %%X in (0, %hgtsize% , !xmax!) do (
rem loop for each column of that TIFF
for /l %%Y in (0, %hgtsize% , !ymax!) do (
echo [Phase 1] Gdal-translate for window %%X %%Y ,ignore HGT name error ...
%gdalpath%gdal_translate.exe -strict -q -r cubic -eco -of SRTMHGT -srcwin %%X %%Y %hgtone% %hgtone% %%F N99E999.HGT 2>&1 | findstr "Expected" > tempdem.out
set /p goodhgt=<tempdem.out
set goodhgt=!goodhgt:~-12,-1!
echo [Phase 2] rename N99E999.HGT to !goodhgt! and clean the temp files ...
rename N99E999.HGT !goodhgt! && del N99E999.HGT.aux.xml tempdem.out
set /A progress+=1
echo --Done--[!goodhgt!]-[HGT:!progress!/!totalsize!]-[TIF:!currentfile!/%totalfiles%]-----
@title tif2hgt : [TIF:!currentfile!/%totalfiles%] [HGT:!progress!/!totalsize!] Processing ... [%%~nxF]
)
)
)
echo =========== END ( check your files, NO error checking ! ) ==========
@title tif2hgt : END
pause
orux can read mbtiles, why do you want to convert?Quote from: "rvb"
PRAGMA synchronous=NORMAL;Quote
PRAGMA journal_mode=WAL;
QuoteSo what is the exact, and minimal, structure of RMAP open format, that Oruxmaps can parse ?
QuoteIn short: custom projection cannot be set formbtilesmaps.
If forcibly set in the oruxmapsmaps.db internal database, it is resetted at the next mapsources rescan.
Is it possible to force a custom projection over a mbtiles ?Quote
1. try to use Oruxmaps otrk2.xml format instead. no issue there. end.Quote
2. import and load the mbtiles as usual (they will have the infamous offset for now)
3. Disable auto-reload of mapsource in settings
3. "root" your way to oruxmapsmaps.db and change PROJ from MERCATORESFERICA to MERCATORELIPSOIDAL with a sqlite editor
4. never rescan your mapsources or you will have to do step 3 again.