kopia lustrzana https://github.com/OpenDroneMap/WebODM
Add spatial reference info field
rodzic
7c4bfb5c16
commit
8174bb9987
|
@ -411,7 +411,15 @@ class Task(models.Model):
|
|||
points = j.get('point_cloud_statistics', {}).get('stats', {}).get('statistic', [{}])[0].get('count')
|
||||
else:
|
||||
points = j.get('reconstruction_statistics', {}).get('reconstructed_points_count')
|
||||
|
||||
|
||||
spatial_refs = []
|
||||
if j.get('reconstruction_statistics', {}).get('has_gps'):
|
||||
spatial_refs.append("gps")
|
||||
if j.get('reconstruction_statistics', {}).get('has_gcp') and 'average_error' in j.get('gcp_errors', {}):
|
||||
spatial_refs.append("gcp")
|
||||
if 'align' in j:
|
||||
spatial_refs.append("alignment")
|
||||
|
||||
return {
|
||||
'pointcloud':{
|
||||
'points': points,
|
||||
|
@ -420,6 +428,7 @@ class Task(models.Model):
|
|||
'area': j.get('processing_statistics', {}).get('area'),
|
||||
'start_date': j.get('processing_statistics', {}).get('start_date'),
|
||||
'end_date': j.get('processing_statistics', {}).get('end_date'),
|
||||
'spatial_refs': spatial_refs,
|
||||
}
|
||||
else:
|
||||
return {}
|
||||
|
|
|
@ -434,6 +434,20 @@ class TaskListItem extends React.Component {
|
|||
this.setState({thumbLoadFailed: true});
|
||||
}
|
||||
|
||||
spatialRefsToHuman = (refs) => {
|
||||
if (refs.indexOf("alignment") !== -1) return _("Alignment");
|
||||
|
||||
let out = [];
|
||||
if (refs.indexOf("gps") !== -1){
|
||||
out.push(_("GPS"));
|
||||
}
|
||||
if (refs.indexOf("gcp") !== -1){
|
||||
out.push(_("GCP"));
|
||||
}
|
||||
|
||||
return out.join("/");
|
||||
}
|
||||
|
||||
render() {
|
||||
const task = this.state.task;
|
||||
const name = task.name !== null ? task.name : interpolate(_("Task #%(number)s"), { number: task.id });
|
||||
|
@ -596,6 +610,11 @@ class TaskListItem extends React.Component {
|
|||
<td><strong>{_("Reconstructed Points:")}</strong></td>
|
||||
<td>{stats.pointcloud.points.toLocaleString()}</td>
|
||||
</tr>}
|
||||
{stats && stats.spatial_refs && stats.spatial_refs.length &&
|
||||
<tr>
|
||||
<td><strong>{_("Spatial Reference:")}</strong></td>
|
||||
<td>{this.spatialRefsToHuman(stats.spatial_refs)}</td>
|
||||
</tr>}
|
||||
{task.size > 0 &&
|
||||
<tr>
|
||||
<td><strong>{_("Disk Usage:")}</strong></td>
|
||||
|
|
Ładowanie…
Reference in New Issue