pull/663/head
Piero Toffanin 2019-05-15 16:18:38 -04:00
rodzic 3d8543cc72
commit f96b3ea8a2
3 zmienionych plików z 9 dodań i 2 usunięć

Wyświetl plik

@ -22,6 +22,7 @@ from django.contrib.postgres import fields
from django.core.exceptions import ValidationError
from django.db import models
from django.db import transaction
from django.db import connection
from django.utils import timezone
from urllib3.exceptions import ReadTimeoutError
@ -696,6 +697,12 @@ class Task(models.Model):
raster = GDALRaster(raster_path)
extent = OGRGeometry.from_bbox(raster.extent)
# Make sure PostGIS supports it
with connection.cursor() as cursor:
cursor.execute("SELECT SRID FROM spatial_ref_sys WHERE SRID = %s", [raster.srid])
if cursor.rowcount == 0:
raise NodeServerError("Unsupported SRS {}. Please make sure you picked a supported SRS.".format(raster.srid))
# It will be implicitly transformed into the SRID of the models field
# self.field = GEOSGeometry(...)
setattr(self, field, GEOSGeometry(extent.wkt, srid=raster.srid))

Wyświetl plik

@ -388,7 +388,7 @@ class ProjectListItem extends React.Component {
<button type="button"
className="btn btn-default btn-sm"
onClick={this.handleImportTask}>
<i className="glyphicon glyphicon-import"></i> Import Existing
<i className="glyphicon glyphicon-import"></i> Import
</button>
</div>
: ""}

Wyświetl plik

@ -1,6 +1,6 @@
{
"name": "WebODM",
"version": "0.9.0",
"version": "0.9.1",
"description": "Open Source Drone Image Processing",
"main": "index.js",
"scripts": {