Skip to content

Commit

Permalink
✨ Add support to qgis 'postgresraster' layer (#652)
Browse files Browse the repository at this point in the history
* Add 'postgresraster' qgis layer type support.

* ⬆️ Client:
    g3w-client :g3w-suite/g3w-client#519

---------

Co-authored-by: wlorenzetti <[email protected]>
Co-authored-by: volterra79 <[email protected]>
  • Loading branch information
3 people committed Nov 15, 2023
1 parent 77fe30d commit b7c8443
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
18 changes: 18 additions & 0 deletions g3w-admin/qdjango/migrations/0115_alter_layer_layer_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.23 on 2023-11-12 11:16

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('qdjango', '0114_alter_sessiontokenfilter_token'),
]

operations = [
migrations.AlterField(
model_name='layer',
name='layer_type',
field=models.CharField(choices=[('postgres', 'Postgres'), ('spatialite', 'SpatiaLite'), ('raster', 'Raster'), ('wfs', 'WFS'), ('wms', 'WMS'), ('ogr', 'OGR'), ('gdal', 'GDAL'), ('delimitedtext', 'CSV'), ('arcgismapserver', 'ArcGisMapServer'), ('arcgisfeatureserver', 'ArcGisFeatureServer'), ('mssql', 'MSSQL'), ('virtual', 'VirtualLayer'), ('oracle', 'Oracle'), ('vector-tile', 'Vector Tile'), ('wcs', 'WCS'), ('vectortile', 'Vector Tile'), ('mdal', 'Mesh layer'), ('postgresraster', 'PostGis raster')], max_length=255, verbose_name='Type'),
),
]
3 changes: 2 additions & 1 deletion g3w-admin/qdjango/models/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,8 @@ class Layer(G3WACLModelMixins, models.Model):
('vector-tile', _('Vector Tile')),
('wcs', _('WCS')),
('vectortile', _('Vector Tile')),
('mdal', _('Mesh layer'))
('mdal', _('Mesh layer')),
('postgresraster', _('PostGis raster'))
)

# General info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" >
<image x="0" y="0" height="100%" width="100%" xlink:href="{% static 'svg/mActionOgrLayer.svg' %}" />
</svg>
{% elif object.layer_type == 'gdal' %}
{% elif object.layer_type in 'gdal,postgresraster' %}
<svg id="circle" height="16" width="16" data-toggle="tooltip" data-placement="top" title="{{ object.layer_type }}" viewBox="0 0 32 32"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" >
<image x="0" y="0" height="100%" width="100%" xlink:href="{% static 'svg/mIconRaster.svg' %}" />
Expand Down

0 comments on commit b7c8443

Please sign in to comment.