Started refactoring some scripts to be python based

pull/989/head
Piero Toffanin 2021-05-26 16:01:52 -04:00
rodzic a19cc6260a
commit d286c72a24
11 zmienionych plików z 275 dodań i 200 usunięć

Wyświetl plik

@ -39,8 +39,8 @@ WORKDIR /webodm
RUN npm install --quiet -g webpack@4.16.5 && npm install --quiet -g webpack-cli@4.2.0 && npm install --quiet && webpack --mode production
RUN echo "UTC" > /etc/timezone
RUN python manage.py collectstatic --noinput
RUN bash app/scripts/plugin_cleanup.sh && echo "from app.plugins import build_plugins;build_plugins()" | python manage.py shell
RUN bash translate.sh build safe
RUN python manage.py rebuildplugins
RUN python manage.py translate build --safe
# Cleanup
RUN apt-get remove -y g++ python3-dev libpq-dev && apt-get autoremove -y

Wyświetl plik

@ -1,4 +1,5 @@
import os
import sys
import kombu
from django.contrib.auth.models import Permission
@ -82,8 +83,10 @@ def boot():
s.app_logo.save(os.path.basename(settings.APP_DEFAULT_LOGO), File(open(settings.APP_DEFAULT_LOGO, 'rb')))
logger.info("Created settings")
init_plugins()
# Invoked via manage.py
if len(sys.argv[1:2]) > 0 and not settings.TESTING:
init_plugins()
if not settings.TESTING:
try:

Wyświetl plik

@ -0,0 +1,25 @@
import os
import shutil
import glob
from django.core.management.base import BaseCommand
from app.plugins import build_plugins
def cleanup():
# Delete all node_modules and build directories within plugins' public/ folders
root = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "..", ".."))
for d in glob.glob(os.path.join(root, "plugins", "**", "public", "node_modules")):
shutil.rmtree(d)
print("R\t" + d)
for d in glob.glob(os.path.join(root, "plugins", "**", "public", "build")):
shutil.rmtree(d)
print("R\t" + d)
print("Cleanup done!")
class Command(BaseCommand):
def add_arguments(self, parser):
super(Command, self).add_arguments(parser)
def handle(self, **options):
cleanup()
build_plugins()

Wyświetl plik

@ -0,0 +1,43 @@
import os
from django.core.management.base import BaseCommand
from django.core.management import call_command
from app.scripts.extract_odm_strings import extract_odm_strings
from app.scripts.extract_plugin_manifest_strings import extract_plugin_manifest_strings
from app.scripts.extract_potree_strings import extract_potree_strings
root = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "..", ".."))
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument("action", type=str, choices=['extract', 'build'])
parser.add_argument("--safe", type=bool, required=False, help="Skip invalid languages")
super(Command, self).add_arguments(parser)
def handle(self, **options):
with open(os.path.join(root, "LOCALES")) as f:
locales = f.read().strip().split(" ")
if options.get('action') == 'extract':
print("Extracting .po files from Django/React")
locale_params = ["--locale=%s" % l for l in locales]
locale_dir = os.path.join(root, "locale")
if not os.path.exists(locale_dir):
os.mkdir(locale_dir)
extract_potree_strings(
os.path.join(root, "app", "static", "app", "js", "vendor", "potree", "build", "potree", "resources", "lang", "en", "translation.json"),
os.path.join(root, "app", "static", "app", "js", "translations", "potree_autogenerated.js")
)
extract_odm_strings(
"https://raw.githubusercontent.com/OpenDroneMap/ODM/master/opendm/config.py",
os.path.join(root, "app", "static", "app", "js", "translations", "odm_autogenerated.js")
)
extract_plugin_manifest_strings(
os.path.join(root, "plugins"),
os.path.join(root, "app", "translations", "plugin_manifest_autogenerated.py")
)
call_command('makemessages', '--keep-pot', *locale_params, '--ignore=build', '--ignore=app/templates/app/registration/*')
call_command('makemessages_djangojs', '--keep-pot', *locale_params, '-d=djangojs', '--extension=jsx', '--extension=js', '--ignore=build', '--ignore=app/static/app/js/vendor', '--ignore=app/static/app/bundles', '--ignore=node_modules', '--language=Python')

Wyświetl plik

Wyświetl plik

@ -3,52 +3,6 @@
import argparse, os, urllib.request, ast, sys
from io import StringIO
parser = argparse.ArgumentParser(description='Extract ODM strings.')
parser.add_argument('input', type=str,
help='URL to ODM\'s config.py')
parser.add_argument('output', type=str,
help='Where to write resulting translation file')
args = parser.parse_args()
url = args.input
outfile = args.output
strings = []
print("Fetching %s ..." % url)
res = urllib.request.urlopen(url)
config_file = res.read().decode('utf-8')
# config_file = open("test.py").read()
options = {}
class ArgumentParserStub(argparse.ArgumentParser):
def add_argument(self, *args, **kwargs):
argparse.ArgumentParser.add_argument(self, *args, **kwargs)
options[args[0]] = {}
for name, value in kwargs.items():
options[args[0]][str(name)] = str(value)
def add_mutually_exclusive_group(self):
return ArgumentParserStub()
# Voodoo! :)
# ( parse AST, extract "def config()" function, set module to only
# contain that function, execute module in current scope,
# run config function)
root = ast.parse(config_file)
new_body = []
for stmt in root.body:
# Assignments
if hasattr(stmt, 'targets'):
new_body.append(stmt)
# Functions
elif hasattr(stmt, 'name'):
new_body.append(stmt)
root.body = new_body
exec(compile(root, filename="<ast>", mode="exec"))
# Misc variables needed to get config to run
__version__ = '?'
class context:
@ -63,22 +17,72 @@ class log:
def ODM_ERROR(s):
pass
config(["--project-path", "/bogus", "name"], parser=ArgumentParserStub())
for opt in options:
h = options[opt].get('help')
if h:
h = h.replace("\n", "")
strings.append(h)
def extract_odm_strings(url, outfile):
strings = []
print("Fetching %s ..." % url)
res = urllib.request.urlopen(url)
config_file = res.read().decode('utf-8')
# config_file = open("test.py").read()
strings = list(set(strings))
print("Found %s ODM strings" % len(strings))
if len(strings) > 0:
with open(outfile, "w") as f:
f.write("// Auto-generated with extract_odm_strings.py, do not edit!\n\n")
options = {}
class ArgumentParserStub(argparse.ArgumentParser):
def add_argument(self, *args, **kwargs):
argparse.ArgumentParser.add_argument(self, *args, **kwargs)
options[args[0]] = {}
for name, value in kwargs.items():
options[args[0]][str(name)] = str(value)
def add_mutually_exclusive_group(self):
return ArgumentParserStub()
for s in strings:
f.write("_(\"%s\");\n" % s.replace("\"", "\\\""))
# Voodoo! :)
# ( parse AST, extract "def config()" function, set module to only
# contain that function, execute module in current scope,
# run config function)
root = ast.parse(config_file)
new_body = []
for stmt in root.body:
# Assignments
if hasattr(stmt, 'targets'):
new_body.append(stmt)
print("Wrote %s" % outfile)
else:
print("No strings found")
# Functions
elif hasattr(stmt, 'name'):
new_body.append(stmt)
root.body = new_body
exec(compile(root, filename="<ast>", mode="exec"), globals())
config(["--project-path", "/bogus", "name"], parser=ArgumentParserStub())
for opt in options:
h = options[opt].get('help')
if h:
h = h.replace("\n", "")
strings.append(h)
strings = list(set(strings))
print("Found %s ODM strings" % len(strings))
if len(strings) > 0:
with open(outfile, "w") as f:
f.write("// Auto-generated with extract_odm_strings.py, do not edit!\n\n")
for s in strings:
f.write("_(\"%s\");\n" % s.replace("\"", "\\\""))
print("Wrote %s" % outfile)
else:
print("No strings found")
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Extract ODM strings.')
parser.add_argument('input', type=str,
help='URL to ODM\'s config.py')
parser.add_argument('output', type=str,
help='Where to write resulting translation file')
args = parser.parse_args()
url = args.input
outfile = args.output

Wyświetl plik

@ -1,33 +1,37 @@
#!/usr/bin/python3
import argparse, json, os, glob
import json, os, glob
parser = argparse.ArgumentParser(description='Extract plugin manifest strings.')
parser.add_argument('input', type=str,
help='Path to plugins directory')
parser.add_argument('output', type=str,
help='Where to write resulting translation file')
args = parser.parse_args()
def extract_plugin_manifest_strings(plugins_dir, output):
strings = []
manifests = glob.glob(os.path.join(plugins_dir, "*", "manifest.json"), recursive=True)
print("Found %s manifests" % len(manifests))
strings = []
manifests = glob.glob(os.path.join(args.input, "*", "manifest.json"), recursive=True)
print("Found %s manifests" % len(manifests))
for m in manifests:
with open(m) as f:
j = json.loads(f.read())
if j.get("description"):
strings.append(j.get("description"))
for m in manifests:
with open(m) as f:
j = json.loads(f.read())
if j.get("description"):
strings.append(j.get("description"))
print("Found %s manifest strings" % len(strings))
if len(strings) > 0:
with open(output, "w") as f:
f.write("// Auto-generated with extract_plugin_manifest_strings.py, do not edit!\n\n")
f.write("from django.utils.translation import gettext as _\n")
for s in strings:
f.write("_(\"%s\")\n" % s.replace("\"", "\\\""))
print("Found %s manifest strings" % len(strings))
if len(strings) > 0:
with open(args.output, "w") as f:
f.write("// Auto-generated with extract_plugin_manifest_strings.py, do not edit!\n\n")
f.write("from django.utils.translation import gettext as _\n")
for s in strings:
f.write("_(\"%s\")\n" % s.replace("\"", "\\\""))
print("Wrote %s" % output)
else:
print("No strings found")
print("Wrote %s" % args.output)
else:
print("No strings found")
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser(description='Extract plugin manifest strings.')
parser.add_argument('input', type=str,
help='Path to plugins directory')
parser.add_argument('output', type=str,
help='Where to write resulting translation file')
args = parser.parse_args()
extract_plugin_manifest_strings(args.input, args.output)

Wyświetl plik

@ -1,31 +1,35 @@
#!/usr/bin/python3
import argparse, json, os
import json, os
parser = argparse.ArgumentParser(description='Extract Potree strings.')
parser.add_argument('input', type=str,
help='Path to Potree\'s english translation.json')
parser.add_argument('output', type=str,
help='Where to write resulting translation file')
args = parser.parse_args()
def extract_potree_strings(translation_json, output):
strings = []
with open(translation_json) as f:
j = json.loads(f.read())
for section in j:
s = j[section]
for k in s:
english_str = s[k]
strings.append(english_str)
strings = []
with open(args.input) as f:
j = json.loads(f.read())
for section in j:
s = j[section]
for k in s:
english_str = s[k]
strings.append(english_str)
print("Found %s Potree strings" % len(strings))
if len(strings) > 0:
with open(output, "w") as f:
f.write("// Auto-generated with extract_potree_strings.py, do not edit!\n\n")
print("Found %s Potree strings" % len(strings))
if len(strings) > 0:
with open(args.output, "w") as f:
f.write("// Auto-generated with extract_potree_strings.py, do not edit!\n\n")
for s in strings:
f.write("_(\"%s\");\n" % s.replace("\"", "\\\""))
for s in strings:
f.write("_(\"%s\");\n" % s.replace("\"", "\\\""))
print("Wrote %s" % output)
else:
print("No strings found")
print("Wrote %s" % args.output)
else:
print("No strings found")
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser(description='Extract Potree strings.')
parser.add_argument('input', type=str,
help='Path to Potree\'s english translation.json')
parser.add_argument('output', type=str,
help='Where to write resulting translation file')
args = parser.parse_args()
extract_potree_strings(args.input, args.output)

Wyświetl plik

@ -1,8 +0,0 @@
#!/bin/bash
# Delete all node_modules and build directories within plugins' public/ folders
__dirname=$(cd $(dirname "$0"); pwd -P)
cd "${__dirname}/../../"
find plugins/ -type d \( -name build -o -name node_modules \) -path 'plugins/*/public/*' -exec rm -frv '{}' \;
echo "Done!"

Wyświetl plik

@ -1,81 +1,81 @@
// Auto-generated with extract_odm_strings.py, do not edit!
_("Keep faces in the mesh that are not seen in any camera. Default: %(default)s");
_("Name of dataset (i.e subfolder name within project folder). Default: %(default)s");
_("Filters the point cloud by removing points that deviate more than N standard deviations from the local mean. Set to 0 to disable filtering. Default: %(default)s");
_("Legacy option (use --feature-quality instead). Resizes images by the largest side for feature extraction purposes only. Set to -1 to disable. This does not affect the final orthophoto resolution quality and will not resize the original images. Default: %(default)s");
_("Radius of the overlap between submodels. After grouping images into clusters, images that are closer than this radius to a cluster are added to the cluster. This is done to ensure that neighboring submodels overlap. Default: %(default)s");
_("Path to the image groups file that controls how images should be split into groups. The file needs to use the following format: image_name group_nameDefault: %(default)s");
_("Matcher algorithm, Fast Library for Approximate Nearest Neighbors or Bag of Words. FLANN is slower, but more stable. BOW is faster, but can sometimes miss valid matches. Can be one of: %(choices)s. Default: %(default)s");
_("URL to a ClusterODM instance for distributing a split-merge workflow on multiple nodes in parallel. Default: %(default)s");
_("Rerun processing from this stage. Can be one of: %(choices)s. Default: %(default)s");
_("Turn off camera parameter optimization during bundle adjustment. This can be sometimes useful for improving results that exhibit doming/bowling or when images are taken with a rolling shutter camera. Default: %(default)s");
_("Generates a benchmark file with runtime info. Default: %(default)s");
_("Number of steps used to fill areas with gaps. Set to 0 to disable gap filling. Starting with a radius equal to the output resolution, N different DEMs are generated with progressively bigger radius using the inverse distance weighted (IDW) algorithm and merged together. Remaining gaps are then merged using nearest neighbor interpolation. Default: %(default)s");
_("Rerun this stage only and stop. Can be one of: %(choices)s. Default: %(default)s");
_("Reduce the memory usage needed for depthmap fusion by splitting large scenes into tiles. Turn this on if your machine doesn't have much RAM and/or you've set --pc-quality to high or ultra. Experimental. Default: %(default)s");
_("Minimum number of features to extract per image. More features can be useful for finding more matches between images, potentially allowing the reconstruction of areas with little overlap or insufficient features. More features also slow down processing. Default: %(default)s");
_("Average number of images per submodel. When splitting a large dataset into smaller submodels, images are grouped into clusters. This value regulates the number of images that each cluster should have on average. Default: %(default)s");
_("Path to the file containing the ground control points used for georeferencing. The file needs to use the following format: EPSG:<code> or <+proj definition>geo_x geo_y geo_z im_x im_y image_name [gcp_name] [extra1] [extra2]Default: %(default)s");
_("Computes an euclidean raster map for each DEM. The map reports the distance from each cell to the nearest NODATA value (before any hole filling takes place). This can be useful to isolate the areas that have been filled. Default: %(default)s");
_("Export the georeferenced point cloud in Entwine Point Tile (EPT) format. Default: %(default)s");
_("Turn on gamma tone mapping or none for no tone mapping. Can be one of %(choices)s. Default: %(default)s ");
_("Export the georeferenced point cloud in LAS format. Default: %(default)s");
_("DSM/DTM resolution in cm / pixel. Note that this value is capped by a ground sampling distance (GSD) estimate. To remove the cap, check --ignore-gsd also. Default: %(default)s");
_("Legacy option (use --pc-quality instead). Controls the density of the point cloud by setting the resolution of the depthmap images. Higher values take longer to compute but produce denser point clouds. Default: %(default)s");
_("Run local bundle adjustment for every image added to the reconstruction and a global adjustment every 100 images. Speeds up reconstruction for very large datasets. Default: %(default)s");
_("Simple Morphological Filter elevation threshold parameter (meters). Default: %(default)s");
_("Skip the blending of colors near seams. Default: %(default)s");
_("Use the camera parameters computed from another dataset instead of calculating them. Can be specified either as path to a cameras.json file or as a JSON string representing the contents of a cameras.json file. Default: %(default)s");
_("Generate static tiles for orthophotos and DEMs that are suitable for viewers like Leaflet or OpenLayers. Default: %(default)s");
_("Choose the algorithm for extracting keypoints and computing descriptors. Can be one of: %(choices)s. Default: %(default)s");
_("Use this tag to build a DSM (Digital Surface Model, ground + objects) using a progressive morphological filter. Check the --dem* parameters for finer tuning. Default: %(default)s");
_("Simple Morphological Filter slope parameter (rise over run). Default: %(default)s");
_("show this help message and exit");
_("Skip generation of PDF report. This can save time if you don't need a report. Default: %(default)s");
_("Print additional messages to the console. Default: %(default)s");
_("Export the georeferenced point cloud in CSV format. Default: %(default)s");
_("Filters the point cloud by keeping only a single point around a radius N (in meters). This can be useful to limit the output resolution of the point cloud and remove duplicate points. Set to 0 to disable sampling. Default: %(default)s");
_("Set a value in meters for the GPS Dilution of Precision (DOP) information for all images. If your images are tagged with high precision GPS information (RTK), this value will be automatically set accordingly. You can use this option to manually set it in case the reconstruction fails. Lowering this option can sometimes help control bowling-effects over large areas. Default: %(default)s");
_("Print debug messages. Default: %(default)s");
_("Distance threshold in meters to find pre-matching images based on GPS exif data. Set both matcher-neighbors and this to 0 to skip pre-matching. Default: %(default)s");
_("When texturing the 3D mesh, for each triangle, choose to prioritize images with sharp features (gmi) or those that cover the largest area (area). Default: %(default)s");
_("Use this tag if you have a GCP File but want to use the EXIF information for georeferencing instead. Default: %(default)s");
_("Decimate the points before generating the DEM. 1 is no decimation (full quality). 100 decimates ~99%% of the points. Useful for speeding up generation of DEM results in very large datasets. Default: %(default)s");
_("Perform ground rectification on the point cloud. This means that wrongly classified ground points will be re-classified and gaps will be filled. Useful for generating DTMs. Default: %(default)s");
_("Set feature extraction quality. Higher quality generates better features, but requires more memory and takes longer. Can be one of: %(choices)s. Default: %(default)s");
_("The maximum vertex count of the output mesh. Default: %(default)s");
_("Set the radiometric calibration to perform on images. When processing multispectral and thermal images you should set this option to obtain reflectance/temperature values (otherwise you will get digital number values). [camera] applies black level, vignetting, row gradient gain/exposure compensation (if appropriate EXIF tags are found) and computes absolute temperature values. [camera+sun] is experimental, applies all the corrections of [camera], plus compensates for spectral radiance registered via a downwelling light sensor (DLS) taking in consideration the angle of the sun. Can be one of: %(choices)s. Default: %(default)s");
_("Set point cloud quality. Higher quality generates better, denser point clouds, but requires more memory and takes longer. Each step up in quality increases processing time roughly by a factor of 4x.Can be one of: %(choices)s. Default: %(default)s");
_("Simple Morphological Filter window radius parameter (meters). Default: %(default)s");
_("Set this parameter if you want to generate a Google Earth (KMZ) rendering of the orthophoto. Default: %(default)s");
_("Delete heavy intermediate files to optimize disk space usage. This affects the ability to restart the pipeline from an intermediate stage, but allows datasets to be processed on machines that don't have sufficient disk space available. Default: %(default)s");
_("Skip normalization of colors across all images. Useful when processing radiometric data. Default: %(default)s");
_("Set this parameter if you want to generate a PNG rendering of the orthophoto. Default: %(default)s");
_("When processing multispectral datasets, you can specify the name of the primary band that will be used for reconstruction. It's recommended to choose a band which has sharp details and is in focus. Default: %(default)s");
_("Orthophoto resolution in cm / pixel. Note that this value is capped by a ground sampling distance (GSD) estimate. To remove the cap, check --ignore-gsd also. Default: %(default)s");
_("Permanently delete all previous results and rerun the processing pipeline.");
_("Set this parameter if you want a striped GeoTIFF. Default: %(default)s");
_("Set a camera projection type. Manually setting a value can help improve geometric undistortion. By default the application tries to determine a lens type from the images metadata. Can be one of: %(choices)s. Default: %(default)s");
_("Path to the project folder. Your project folder should contain subfolders for each dataset. Each dataset should have an \"images\" folder.");
_("Generates a polygon around the cropping area that cuts the orthophoto around the edges of features. This polygon can be useful for stitching seamless mosaics with multiple overlapping orthophotos. Default: %(default)s");
_("Displays version number and exits. ");
_("Choose what to merge in the merge step in a split dataset. By default all available outputs are merged. Options: %(choices)s. Default: %(default)s");
_("Skip generation of a full 3D model. This can save time if you only need 2D results such as orthophotos and DEMs. Default: %(default)s");
_("Classify the point cloud outputs using a Simple Morphological Filter. You can control the behavior of this option by tweaking the --dem-* parameters. Default: %(default)s");
_("End processing at this stage. Can be one of: %(choices)s. Default: %(default)s");
_("Simple Morphological Filter elevation scalar parameter. Default: %(default)s");
_("Type of photometric outlier removal method. Can be one of: %(choices)s. Default: %(default)s");
_("Use images' GPS exif data for reconstruction, even if there are GCPs present.This flag is useful if you have high precision GPS measurements. If there are no GCPs, this flag does nothing. Default: %(default)s");
_("Number of nearest images to pre-match based on GPS exif data. Set to 0 to skip pre-matching. Neighbors works together with Distance parameter, set both to 0 to not use pre-matching. Default: %(default)s");
_("Use a full 3D mesh to compute the orthophoto instead of a 2.5D mesh. This option is a bit faster and provides similar results in planar areas. Default: %(default)s");
_("Path to the image geolocation file containing the camera center coordinates used for georeferencing. Note that omega/phi/kappa are currently not supported (you can set them to 0). The file needs to use the following format: EPSG:<code> or <+proj definition>image_name geo_x geo_y geo_z [omega (degrees)] [phi (degrees)] [kappa (degrees)] [horz accuracy (meters)] [vert accuracy (meters)]Default: %(default)s");
_("Use this tag to build a DTM (Digital Terrain Model, ground only) using a simple morphological filter. Check the --dem* and --smrf* parameters for finer tuning. Default: %(default)s");
_("Build orthophoto overviews for faster display in programs such as QGIS. Default: %(default)s");
_("Automatically crop image outputs by creating a smooth buffer around the dataset boundaries, shrinked by N meters. Use 0 to disable cropping. Default: %(default)s");
_("When processing multispectral datasets, ODM will automatically align the images for each band. If the images have been postprocessed and are already aligned, use this option. Default: %(default)s");
_("Set the compression to use for orthophotos. Can be one of: %(choices)s. Default: %(default)s");
_("Set feature extraction quality. Higher quality generates better features, but requires more memory and takes longer. Can be one of: %(choices)s. Default: %(default)s");
_("End processing at this stage. Can be one of: %(choices)s. Default: %(default)s");
_("When texturing the 3D mesh, for each triangle, choose to prioritize images with sharp features (gmi) or those that cover the largest area (area). Default: %(default)s");
_("Delete heavy intermediate files to optimize disk space usage. This affects the ability to restart the pipeline from an intermediate stage, but allows datasets to be processed on machines that don't have sufficient disk space available. Default: %(default)s");
_("Simple Morphological Filter elevation threshold parameter (meters). Default: %(default)s");
_("Use the camera parameters computed from another dataset instead of calculating them. Can be specified either as path to a cameras.json file or as a JSON string representing the contents of a cameras.json file. Default: %(default)s");
_("Type of photometric outlier removal method. Can be one of: %(choices)s. Default: %(default)s");
_("Name of dataset (i.e subfolder name within project folder). Default: %(default)s");
_("Orthophoto resolution in cm / pixel. Note that this value is capped by a ground sampling distance (GSD) estimate. To remove the cap, check --ignore-gsd also. Default: %(default)s");
_("Build orthophoto overviews for faster display in programs such as QGIS. Default: %(default)s");
_("Displays version number and exits. ");
_("Use this tag to build a DSM (Digital Surface Model, ground + objects) using a progressive morphological filter. Check the --dem* parameters for finer tuning. Default: %(default)s");
_("Export the georeferenced point cloud in CSV format. Default: %(default)s");
_("Reduce the memory usage needed for depthmap fusion by splitting large scenes into tiles. Turn this on if your machine doesn't have much RAM and/or you've set --pc-quality to high or ultra. Experimental. Default: %(default)s");
_("Permanently delete all previous results and rerun the processing pipeline.");
_("Export the georeferenced point cloud in Entwine Point Tile (EPT) format. Default: %(default)s");
_("Use this tag if you have a GCP File but want to use the EXIF information for georeferencing instead. Default: %(default)s");
_("Turn off camera parameter optimization during bundle adjustment. This can be sometimes useful for improving results that exhibit doming/bowling or when images are taken with a rolling shutter camera. Default: %(default)s");
_("Generates a polygon around the cropping area that cuts the orthophoto around the edges of features. This polygon can be useful for stitching seamless mosaics with multiple overlapping orthophotos. Default: %(default)s");
_("Print debug messages. Default: %(default)s");
_("Set point cloud quality. Higher quality generates better, denser point clouds, but requires more memory and takes longer. Each step up in quality increases processing time roughly by a factor of 4x.Can be one of: %(choices)s. Default: %(default)s");
_("Number of nearest images to pre-match based on GPS exif data. Set to 0 to skip pre-matching. Neighbors works together with Distance parameter, set both to 0 to not use pre-matching. Default: %(default)s");
_("Set a camera projection type. Manually setting a value can help improve geometric undistortion. By default the application tries to determine a lens type from the images metadata. Can be one of: %(choices)s. Default: %(default)s");
_("Skip generation of PDF report. This can save time if you don't need a report. Default: %(default)s");
_("Octree depth used in the mesh reconstruction, increase to get more vertices, recommended values are 8-12. Default: %(default)s");
_("Skips dense reconstruction and 3D model generation. It generates an orthophoto directly from the sparse reconstruction. If you just need an orthophoto and do not need a full 3D model, turn on this option. Default: %(default)s");
_("Ignore Ground Sampling Distance (GSD). GSD caps the maximum resolution of image outputs and resizes images when necessary, resulting in faster processing and lower memory usage. Since GSD is an estimate, sometimes ignoring it can result in slightly better image output quality. Default: %(default)s");
_("Rerun processing from this stage. Can be one of: %(choices)s. Default: %(default)s");
_("Turn on gamma tone mapping or none for no tone mapping. Can be one of %(choices)s. Default: %(default)s ");
_("Decimate the points before generating the DEM. 1 is no decimation (full quality). 100 decimates ~99%% of the points. Useful for speeding up generation of DEM results in very large datasets. Default: %(default)s");
_("Path to the image groups file that controls how images should be split into groups. The file needs to use the following format: image_name group_nameDefault: %(default)s");
_("Skip normalization of colors across all images. Useful when processing radiometric data. Default: %(default)s");
_("Filters the point cloud by removing points that deviate more than N standard deviations from the local mean. Set to 0 to disable filtering. Default: %(default)s");
_("Set a value in meters for the GPS Dilution of Precision (DOP) information for all images. If your images are tagged with high precision GPS information (RTK), this value will be automatically set accordingly. You can use this option to manually set it in case the reconstruction fails. Lowering this option can sometimes help control bowling-effects over large areas. Default: %(default)s");
_("Skip the blending of colors near seams. Default: %(default)s");
_("The maximum vertex count of the output mesh. Default: %(default)s");
_("Set this parameter if you want to generate a PNG rendering of the orthophoto. Default: %(default)s");
_("Set this parameter if you want a striped GeoTIFF. Default: %(default)s");
_("Generates a benchmark file with runtime info. Default: %(default)s");
_("Run local bundle adjustment for every image added to the reconstruction and a global adjustment every 100 images. Speeds up reconstruction for very large datasets. Default: %(default)s");
_("Computes an euclidean raster map for each DEM. The map reports the distance from each cell to the nearest NODATA value (before any hole filling takes place). This can be useful to isolate the areas that have been filled. Default: %(default)s");
_("The maximum number of processes to use in various processes. Peak memory requirement is ~1GB per thread and 2 megapixel image resolution. Default: %(default)s");
_("show this help message and exit");
_("Rerun this stage only and stop. Can be one of: %(choices)s. Default: %(default)s");
_("Simple Morphological Filter window radius parameter (meters). Default: %(default)s");
_("Keep faces in the mesh that are not seen in any camera. Default: %(default)s");
_("Minimum number of features to extract per image. More features can be useful for finding more matches between images, potentially allowing the reconstruction of areas with little overlap or insufficient features. More features also slow down processing. Default: %(default)s");
_("Use a full 3D mesh to compute the orthophoto instead of a 2.5D mesh. This option is a bit faster and provides similar results in planar areas. Default: %(default)s");
_("Skip generation of a full 3D model. This can save time if you only need 2D results such as orthophotos and DEMs. Default: %(default)s");
_("Number of steps used to fill areas with gaps. Set to 0 to disable gap filling. Starting with a radius equal to the output resolution, N different DEMs are generated with progressively bigger radius using the inverse distance weighted (IDW) algorithm and merged together. Remaining gaps are then merged using nearest neighbor interpolation. Default: %(default)s");
_("Set this parameter if you want to generate a Google Earth (KMZ) rendering of the orthophoto. Default: %(default)s");
_("Print additional messages to the console. Default: %(default)s");
_("Classify the point cloud outputs using a Simple Morphological Filter. You can control the behavior of this option by tweaking the --dem-* parameters. Default: %(default)s");
_("Ignore Ground Sampling Distance (GSD). GSD caps the maximum resolution of image outputs and resizes images when necessary, resulting in faster processing and lower memory usage. Since GSD is an estimate, sometimes ignoring it can result in slightly better image output quality. Default: %(default)s");
_("Simple Morphological Filter elevation scalar parameter. Default: %(default)s");
_("Set the compression to use for orthophotos. Can be one of: %(choices)s. Default: %(default)s");
_("Distance threshold in meters to find pre-matching images based on GPS exif data. Set both matcher-neighbors and this to 0 to skip pre-matching. Default: %(default)s");
_("Set the radiometric calibration to perform on images. When processing multispectral and thermal images you should set this option to obtain reflectance/temperature values (otherwise you will get digital number values). [camera] applies black level, vignetting, row gradient gain/exposure compensation (if appropriate EXIF tags are found) and computes absolute temperature values. [camera+sun] is experimental, applies all the corrections of [camera], plus compensates for spectral radiance registered via a downwelling light sensor (DLS) taking in consideration the angle of the sun. Can be one of: %(choices)s. Default: %(default)s");
_("Radius of the overlap between submodels. After grouping images into clusters, images that are closer than this radius to a cluster are added to the cluster. This is done to ensure that neighboring submodels overlap. Default: %(default)s");
_("URL to a ClusterODM instance for distributing a split-merge workflow on multiple nodes in parallel. Default: %(default)s");
_("Use images' GPS exif data for reconstruction, even if there are GCPs present.This flag is useful if you have high precision GPS measurements. If there are no GCPs, this flag does nothing. Default: %(default)s");
_("When processing multispectral datasets, ODM will automatically align the images for each band. If the images have been postprocessed and are already aligned, use this option. Default: %(default)s");
_("Use this tag to build a DTM (Digital Terrain Model, ground only) using a simple morphological filter. Check the --dem* and --smrf* parameters for finer tuning. Default: %(default)s");
_("Legacy option (use --pc-quality instead). Controls the density of the point cloud by setting the resolution of the depthmap images. Higher values take longer to compute but produce denser point clouds. Default: %(default)s");
_("Generate static tiles for orthophotos and DEMs that are suitable for viewers like Leaflet or OpenLayers. Default: %(default)s");
_("Skips dense reconstruction and 3D model generation. It generates an orthophoto directly from the sparse reconstruction. If you just need an orthophoto and do not need a full 3D model, turn on this option. Default: %(default)s");
_("Legacy option (use --feature-quality instead). Resizes images by the largest side for feature extraction purposes only. Set to -1 to disable. This does not affect the final orthophoto resolution quality and will not resize the original images. Default: %(default)s");
_("Simple Morphological Filter slope parameter (rise over run). Default: %(default)s");
_("When processing multispectral datasets, you can specify the name of the primary band that will be used for reconstruction. It's recommended to choose a band which has sharp details and is in focus. Default: %(default)s");
_("DSM/DTM resolution in cm / pixel. Note that this value is capped by a ground sampling distance (GSD) estimate. To remove the cap, check --ignore-gsd also. Default: %(default)s");
_("Choose the algorithm for extracting keypoints and computing descriptors. Can be one of: %(choices)s. Default: %(default)s");
_("Average number of images per submodel. When splitting a large dataset into smaller submodels, images are grouped into clusters. This value regulates the number of images that each cluster should have on average. Default: %(default)s");
_("Matcher algorithm, Fast Library for Approximate Nearest Neighbors or Bag of Words. FLANN is slower, but more stable. BOW is faster, but can sometimes miss valid matches. Can be one of: %(choices)s. Default: %(default)s");
_("Filters the point cloud by keeping only a single point around a radius N (in meters). This can be useful to limit the output resolution of the point cloud and remove duplicate points. Set to 0 to disable sampling. Default: %(default)s");
_("Path to the image geolocation file containing the camera center coordinates used for georeferencing. Note that omega/phi/kappa are currently not supported (you can set them to 0). The file needs to use the following format: EPSG:<code> or <+proj definition>image_name geo_x geo_y geo_z [omega (degrees)] [phi (degrees)] [kappa (degrees)] [horz accuracy (meters)] [vert accuracy (meters)]Default: %(default)s");
_("Choose what to merge in the merge step in a split dataset. By default all available outputs are merged. Options: %(choices)s. Default: %(default)s");
_("Perform ground rectification on the point cloud. This means that wrongly classified ground points will be re-classified and gaps will be filled. Useful for generating DTMs. Default: %(default)s");
_("Path to the file containing the ground control points used for georeferencing. The file needs to use the following format: EPSG:<code> or <+proj definition>geo_x geo_y geo_z im_x im_y image_name [gcp_name] [extra1] [extra2]Default: %(default)s");
_("Export the georeferenced point cloud in LAS format. Default: %(default)s");

Wyświetl plik

@ -51,7 +51,7 @@ if [ "$1" = "--setup-devenv" ] || [ "$2" = "--setup-devenv" ]; then
pip install -r requirements.txt
echo Build translations...
./translate.sh build safe
python manage.py translate build --safe
echo Setup webpack watch...
webpack --watch &