kopia lustrzana https://github.com/OpenDroneMap/NodeODM
commit
b2a450ca52
|
@ -158,8 +158,8 @@ module.exports = {
|
||||||
'float': Number.parseFloat,
|
'float': Number.parseFloat,
|
||||||
'int': Number.parseInt,
|
'int': Number.parseInt,
|
||||||
'bool': function(value){
|
'bool': function(value){
|
||||||
if (value === 'true') return true;
|
if (value === 'true' || value === '1') return true;
|
||||||
else if (value === 'false') return false;
|
else if (value === 'false' || value === '0') return false;
|
||||||
else if (typeof value === 'boolean') return value;
|
else if (typeof value === 'boolean') return value;
|
||||||
else throw new Error(`Cannot convert ${value} to boolean`);
|
else throw new Error(`Cannot convert ${value} to boolean`);
|
||||||
},
|
},
|
||||||
|
|
Plik diff jest za duży
Load Diff
|
@ -37,12 +37,11 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Generate Tiles
|
# Generate Tiles
|
||||||
if hash gdal2tiles.py 2>/dev/null; then
|
g2t_options="--processes $(nproc) -z 12-21 -n -w none"
|
||||||
g2t_options="-z 12-21 -n -w none"
|
|
||||||
orthophoto_path="odm_orthophoto/odm_orthophoto.tif"
|
orthophoto_path="odm_orthophoto/odm_orthophoto.tif"
|
||||||
|
|
||||||
if [ -e "$orthophoto_path" ]; then
|
if [ -e "$orthophoto_path" ]; then
|
||||||
gdal2tiles.py $g2t_options $orthophoto_path orthophoto_tiles
|
python "$script_path/gdal2tiles.py" $g2t_options $orthophoto_path orthophoto_tiles
|
||||||
else
|
else
|
||||||
echo "No orthophoto found at $orthophoto_path: will skip tiling"
|
echo "No orthophoto found at $orthophoto_path: will skip tiling"
|
||||||
fi
|
fi
|
||||||
|
@ -50,14 +49,11 @@ if hash gdal2tiles.py 2>/dev/null; then
|
||||||
for dem_product in ${dem_products[@]}; do
|
for dem_product in ${dem_products[@]}; do
|
||||||
colored_dem_path="odm_dem/""$dem_product""_colored_hillshade.tif"
|
colored_dem_path="odm_dem/""$dem_product""_colored_hillshade.tif"
|
||||||
if [ -e "$colored_dem_path" ]; then
|
if [ -e "$colored_dem_path" ]; then
|
||||||
gdal2tiles.py $g2t_options $colored_dem_path "$dem_product""_tiles"
|
python "$script_path/gdal2tiles.py" $g2t_options $colored_dem_path "$dem_product""_tiles"
|
||||||
else
|
else
|
||||||
echo "No $dem_product found at $colored_dem_path: will skip tiling"
|
echo "No $dem_product found at $colored_dem_path: will skip tiling"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
else
|
|
||||||
echo "gdal2tiles.py is not installed, will skip tiling"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Generate MBTiles
|
# Generate MBTiles
|
||||||
if hash gdal_translate 2>/dev/null; then
|
if hash gdal_translate 2>/dev/null; then
|
||||||
|
@ -82,6 +78,7 @@ if hash PotreeConverter 2>/dev/null; then
|
||||||
"odm_georeferencing/odm_georeferenced_model.ply" \
|
"odm_georeferencing/odm_georeferenced_model.ply" \
|
||||||
"opensfm/depthmaps/merged.ply" \
|
"opensfm/depthmaps/merged.ply" \
|
||||||
"smvs/smvs_dense_point_cloud.ply" \
|
"smvs/smvs_dense_point_cloud.ply" \
|
||||||
|
"mve/mve_dense_point_cloud.ply" \
|
||||||
"pmvs/recon0/models/option-0000.ply"; do
|
"pmvs/recon0/models/option-0000.ply"; do
|
||||||
if [ -e $path ]; then
|
if [ -e $path ]; then
|
||||||
echo "Found suitable point cloud for PotreeConverter: $path"
|
echo "Found suitable point cloud for PotreeConverter: $path"
|
||||||
|
|
Ładowanie…
Reference in New Issue