diff options
author | Thomas André <thomas.andre@iggdrasil.net> | 2025-06-04 10:27:12 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-07-29 08:49:03 +0200 |
commit | edf13b44cc8f9d73b7be4574affe57faf5d07e6d (patch) | |
tree | 977fd4374bf6b82ecd3879e065fd7e3dc2f1c8da /ishtar_common | |
parent | efc285c4615227b7c8f6503dca716d3160e0af7f (diff) | |
download | Ishtar-edf13b44cc8f9d73b7be4574affe57faf5d07e6d.tar.bz2 Ishtar-edf13b44cc8f9d73b7be4574affe57faf5d07e6d.zip |
New version for the export: creation of Finds and Context records layers adapted to the data source and new automations
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/forms_common.py | 6 | ||||
-rw-r--r-- | ishtar_common/models_imports.py | 6 | ||||
-rw-r--r-- | ishtar_common/qfield/model/Context_records.gpkg | bin | 0 -> 106496 bytes | |||
-rw-r--r-- | ishtar_common/qfield/model/Finds.gpkg | bin | 106496 -> 106496 bytes | |||
-rw-r--r-- | ishtar_common/qfield/model/Prospections.qgs | 2792 | ||||
-rw-r--r-- | ishtar_common/qfield/model/Prospections_attachments.zip | bin | 1124 -> 1124 bytes | |||
-rw-r--r-- | ishtar_common/qfield/model/Prospections_qfield.zip | bin | 1219 -> 1219 bytes | |||
-rw-r--r-- | ishtar_common/tests.py | 179 | ||||
-rw-r--r-- | ishtar_common/views.py | 4 | ||||
-rw-r--r-- | ishtar_common/views_item.py | 522 |
10 files changed, 2857 insertions, 652 deletions
diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py index 5789f1e8d..13c96e38a 100644 --- a/ishtar_common/forms_common.py +++ b/ishtar_common/forms_common.py @@ -405,7 +405,7 @@ class NewImportForm(BaseImportForm): raise forms.ValidationError( _('"Associated images" field must be a valid zip file.') ) - types = [".csv", ".ods", ".xls", ".xlsx", ".xlsm"] + types = [".csv", ".ods", ".xls", ".xlsx", ".xlsm", ".zip", ".gpkg"] self._clean_imported_file(types=types) archive_required = self._need_archive(data) if archive_required and ( @@ -447,7 +447,7 @@ class NewImportForm(BaseImportForm): return item -class NewImportGISForm(BaseImportForm): +class NewImportGISForm(NewImportForm): error_css_class = "error" required_css_class = "required" importer_type = "gis" @@ -462,6 +462,8 @@ class NewImportGISForm(BaseImportForm): "skip_lines", "encoding", "csv_sep", + "imported_images", + "imported_media_link", ) HEADERS = { diff --git a/ishtar_common/models_imports.py b/ishtar_common/models_imports.py index 6a9b8b145..2a7039d51 100644 --- a/ishtar_common/models_imports.py +++ b/ishtar_common/models_imports.py @@ -2325,7 +2325,7 @@ class Import(BaseImport): return name = self.imported_file.name.lower() ext = name.split(".")[-1] - if ext not in ("ods", "xls", "xlsx", "xlsm"): + if ext not in ("ods", "xls", "xlsx", "xlsm", "zip", "gpkg"): return imported_file_path = os.path.abspath(self.imported_file.path) media_root = os.path.abspath(settings.MEDIA_ROOT) @@ -2672,6 +2672,10 @@ class Import(BaseImport): if tmp_dir: shutil.rmtree(tmp_dir) + if imported_values.endswith(".gpkg"): + print(data) + del data[0][0] + print(data) return data @property diff --git a/ishtar_common/qfield/model/Context_records.gpkg b/ishtar_common/qfield/model/Context_records.gpkg Binary files differnew file mode 100644 index 000000000..0d00f6158 --- /dev/null +++ b/ishtar_common/qfield/model/Context_records.gpkg diff --git a/ishtar_common/qfield/model/Finds.gpkg b/ishtar_common/qfield/model/Finds.gpkg Binary files differindex a439d366d..79c5e7073 100644 --- a/ishtar_common/qfield/model/Finds.gpkg +++ b/ishtar_common/qfield/model/Finds.gpkg diff --git a/ishtar_common/qfield/model/Prospections.qgs b/ishtar_common/qfield/model/Prospections.qgs index 5049b2e4e..4e042d631 100644 --- a/ishtar_common/qfield/model/Prospections.qgs +++ b/ishtar_common/qfield/model/Prospections.qgs @@ -1,5 +1,5 @@ <!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'> -<qgis saveUser="thomas" saveDateTime="2025-04-30T12:15:50" projectname="" saveUserFull="Thomas ANDRE" version="3.40.5-Bratislava"> +<qgis saveDateTime="2025-06-02T12:01:13" projectname="" saveUserFull="Thomas ANDRE" version="3.40.5-Bratislava" saveUser="thomas"> <homePath path=""/> <title></title> <transaction mode="Disabled"/> @@ -30,28 +30,48 @@ <geographicflag>false</geographicflag> </spatialrefsys> </verticalCrs> - <elevation-shading-renderer light-altitude="45" light-azimuth="315" edl-distance="0.5" hillshading-is-active="0" hillshading-z-factor="1" edl-strength="1000" hillshading-is-multidirectional="0" combined-method="0" edl-is-active="1" edl-distance-unit="0" is-active="0"/> + <elevation-shading-renderer light-azimuth="315" edl-distance-unit="0" edl-is-active="1" hillshading-is-multidirectional="0" is-active="0" edl-strength="1000" edl-distance="0.5" hillshading-z-factor="1" combined-method="0" light-altitude="45" hillshading-is-active="0"/> <layer-tree-group> <customproperties> <Option/> </customproperties> - <layer-tree-layer providerKey="ogr" expanded="1" source="./Finds.gpkg|layername=Finds" patch_size="-1,-1" name="Finds" legend_exp="" checked="Qt::Checked" legend_split_behavior="0" id="Finds_7595ca92_4128_456d_a700_416cedf9aaa4"> + <layer-tree-layer checked="Qt::Checked" expanded="1" source="./Context_records.gpkg|layername=Context_records" patch_size="-1,-1" name="Context_records" providerKey="ogr" legend_split_behavior="0" legend_exp="" id="Context_records_94782d53_b0c1_4448_9720_44f58c1a13fa"> <customproperties> <Option/> </customproperties> </layer-tree-layer> - <layer-tree-group expanded="1" name="Cartes" checked="Qt::Checked" groupLayer=""> + <layer-tree-layer checked="Qt::Checked" expanded="1" source="./Finds.gpkg|layername=Finds" patch_size="-1,-1" name="Finds" providerKey="ogr" legend_split_behavior="0" legend_exp="" id="Finds_7595ca92_4128_456d_a700_416cedf9aaa4"> <customproperties> <Option/> </customproperties> - <layer-tree-layer providerKey="wms" expanded="0" source="crs=EPSG:3857&format&type=xyz&url=http://tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png&zmax=19&zmin=0" patch_size="-1,-1" name="OSM Standard" legend_exp="" checked="Qt::Checked" legend_split_behavior="0" id="OSM_Standard_88a32e94_cd29_412c_8b66_ee44fe338fab"> + </layer-tree-layer> + <layer-tree-group expanded="0" checked="Qt::Checked" groupLayer="" name="Administratif"> + <customproperties> + <Option/> + </customproperties> + <layer-tree-layer checked="Qt::Unchecked" expanded="1" source=" pagingEnabled='default' preferCoordinatesForWfsT11='false' restrictToRequestBBOX='1' srsname='EPSG:4326' typename='BDPARCELLAIRE-VECTEUR_WLD_BDD_WGS84G:parcelle' url='https://data.geopf.fr/wfs/ows' url='https://data.geopf.fr/wfs/ows?VERSION=2.0.0' version='auto'" patch_size="-1,-1" name="Parcelles" providerKey="WFS" legend_split_behavior="0" legend_exp="" id="Parcelles_b677c8a6_df4d_4e0a_9f9f_42287fd8263e"> + <customproperties> + <Option/> + </customproperties> + </layer-tree-layer> + <layer-tree-layer checked="Qt::Unchecked" expanded="1" source=" pagingEnabled='default' preferCoordinatesForWfsT11='false' restrictToRequestBBOX='1' srsname='EPSG:4326' typename='ADMINEXPRESS-COG.2024:commune' url='https://data.geopf.fr/wfs/ows' url='https://data.geopf.fr/wfs/ows?VERSION=2.0.0' version='auto'" patch_size="-1,-1" name="Communes" providerKey="WFS" legend_split_behavior="0" legend_exp="" id="Communes_4866eaff_96f1_4af8_820c_6a6e1c2a757b"> + <customproperties> + <Option/> + </customproperties> + </layer-tree-layer> + </layer-tree-group> + <layer-tree-group expanded="1" checked="Qt::Checked" groupLayer="" name="Cartes"> + <customproperties> + <Option/> + </customproperties> + <layer-tree-layer checked="Qt::Checked" expanded="0" source="crs=EPSG:3857&format&type=xyz&url=http://tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png&zmax=19&zmin=0" patch_size="-1,-1" name="OSM Standard" providerKey="wms" legend_split_behavior="0" legend_exp="" id="OSM_Standard_88a32e94_cd29_412c_8b66_ee44fe338fab"> <customproperties> <Option type="Map"> <Option type="invalid" name="expandedLegendNodes"/> </Option> </customproperties> </layer-tree-layer> - <layer-tree-layer providerKey="wms" expanded="0" source="crs=EPSG:3857&dpiMode=7&featureCount=10&format=image/jpeg&layers=HR.ORTHOIMAGERY.ORTHOPHOTOS&styles=normal&tileMatrixSet=PM_6_19&tilePixelRatio=0&url=https://data.geopf.fr/wmts?SERVICE%3DWMTS%26VERSION%3D1.0.0%26REQUEST%3DGetCapabilities" patch_size="-1,-1" name="Ortho 20 cm" legend_exp="" checked="Qt::Checked" legend_split_behavior="0" id="Ortho_20_cm_f8497a68_e819_4170_a2ce_17cc699ac2d2"> + <layer-tree-layer checked="Qt::Checked" expanded="0" source="crs=EPSG:3857&dpiMode=7&featureCount=10&format=image/jpeg&layers=HR.ORTHOIMAGERY.ORTHOPHOTOS&styles=normal&tileMatrixSet=PM_6_19&tilePixelRatio=0&url=https://data.geopf.fr/wmts?SERVICE%3DWMTS%26VERSION%3D1.0.0%26REQUEST%3DGetCapabilities" patch_size="-1,-1" name="Ortho 20 cm" providerKey="wms" legend_split_behavior="0" legend_exp="" id="Ortho_20_cm_f8497a68_e819_4170_a2ce_17cc699ac2d2"> <customproperties> <Option/> </customproperties> @@ -61,11 +81,17 @@ <item>Finds_7595ca92_4128_456d_a700_416cedf9aaa4</item> <item>OSM_Standard_88a32e94_cd29_412c_8b66_ee44fe338fab</item> <item>Ortho_20_cm_f8497a68_e819_4170_a2ce_17cc699ac2d2</item> + <item>Parcelles_b677c8a6_df4d_4e0a_9f9f_42287fd8263e</item> + <item>Communes_4866eaff_96f1_4af8_820c_6a6e1c2a757b</item> + <item>Context_records_94782d53_b0c1_4448_9720_44f58c1a13fa</item> </custom-order> </layer-tree-group> - <snapping-settings intersection-snapping="0" self-snapping="0" minScale="0" maxScale="0" enabled="0" type="1" tolerance="12" mode="2" scaleDependencyMode="0" unit="1"> + <snapping-settings minScale="0" mode="2" enabled="0" maxScale="0" type="1" unit="1" self-snapping="0" tolerance="12" intersection-snapping="0" scaleDependencyMode="0"> <individual-layer-settings> - <layer-setting units="1" minScale="0" maxScale="0" enabled="0" type="1" tolerance="12" id="Finds_7595ca92_4128_456d_a700_416cedf9aaa4"/> + <layer-setting minScale="0" enabled="0" maxScale="0" type="1" tolerance="12" id="Context_records_94782d53_b0c1_4448_9720_44f58c1a13fa" units="1"/> + <layer-setting minScale="0" enabled="0" maxScale="0" type="1" tolerance="12" id="Parcelles_b677c8a6_df4d_4e0a_9f9f_42287fd8263e" units="1"/> + <layer-setting minScale="0" enabled="0" maxScale="0" type="1" tolerance="12" id="Communes_4866eaff_96f1_4af8_820c_6a6e1c2a757b" units="1"/> + <layer-setting minScale="0" enabled="0" maxScale="0" type="1" tolerance="12" id="Finds_7595ca92_4128_456d_a700_416cedf9aaa4" units="1"/> </individual-layer-settings> </snapping-settings> <relations/> @@ -73,10 +99,10 @@ <mapcanvas annotationsVisible="1" name="theMapCanvas"> <units>degrees</units> <extent> - <xmin>-4.83189219737137599</xmin> - <ymin>43.70747210619575895</ymin> - <xmax>8.19138905262862771</xmax> - <ymax>49.86105416580328864</ymax> + <xmin>-4.78929591895689732</xmin> + <ymin>43.59536848099315165</ymin> + <xmax>8.23398533104295716</xmax> + <ymax>49.74895054059680177</ymax> </extent> <rotation>0</rotation> <destinationsrs> @@ -97,26 +123,43 @@ </mapcanvas> <projectModels/> <legend updateDrawingOrder="true"> - <legendlayer open="true" showFeatureCount="0" drawingOrder="-1" name="Finds" checked="Qt::Checked"> - <filegroup open="true" hidden="false"> - <legendlayerfile isInOverview="0" layerid="Finds_7595ca92_4128_456d_a700_416cedf9aaa4" visible="1"/> + <legendlayer checked="Qt::Checked" drawingOrder="-1" showFeatureCount="0" name="Context_records" open="true"> + <filegroup hidden="false" open="true"> + <legendlayerfile layerid="Context_records_94782d53_b0c1_4448_9720_44f58c1a13fa" isInOverview="0" visible="1"/> + </filegroup> + </legendlayer> + <legendlayer checked="Qt::Checked" drawingOrder="-1" showFeatureCount="0" name="Finds" open="true"> + <filegroup hidden="false" open="true"> + <legendlayerfile layerid="Finds_7595ca92_4128_456d_a700_416cedf9aaa4" isInOverview="0" visible="1"/> </filegroup> </legendlayer> - <legendgroup open="true" name="Cartes" checked="Qt::Checked"> - <legendlayer open="false" showFeatureCount="0" drawingOrder="-1" name="OSM Standard" checked="Qt::Checked"> - <filegroup open="false" hidden="false"> - <legendlayerfile isInOverview="0" layerid="OSM_Standard_88a32e94_cd29_412c_8b66_ee44fe338fab" visible="1"/> + <legendgroup checked="Qt::Checked" name="Administratif" open="false"> + <legendlayer checked="Qt::Unchecked" drawingOrder="-1" showFeatureCount="0" name="Parcelles" open="true"> + <filegroup hidden="false" open="true"> + <legendlayerfile layerid="Parcelles_b677c8a6_df4d_4e0a_9f9f_42287fd8263e" isInOverview="0" visible="0"/> + </filegroup> + </legendlayer> + <legendlayer checked="Qt::Unchecked" drawingOrder="-1" showFeatureCount="0" name="Communes" open="true"> + <filegroup hidden="false" open="true"> + <legendlayerfile layerid="Communes_4866eaff_96f1_4af8_820c_6a6e1c2a757b" isInOverview="0" visible="0"/> + </filegroup> + </legendlayer> + </legendgroup> + <legendgroup checked="Qt::Checked" name="Cartes" open="true"> + <legendlayer checked="Qt::Checked" drawingOrder="-1" showFeatureCount="0" name="OSM Standard" open="false"> + <filegroup hidden="false" open="false"> + <legendlayerfile layerid="OSM_Standard_88a32e94_cd29_412c_8b66_ee44fe338fab" isInOverview="0" visible="1"/> </filegroup> </legendlayer> - <legendlayer open="false" showFeatureCount="0" drawingOrder="-1" name="Ortho 20 cm" checked="Qt::Checked"> - <filegroup open="false" hidden="false"> - <legendlayerfile isInOverview="0" layerid="Ortho_20_cm_f8497a68_e819_4170_a2ce_17cc699ac2d2" visible="1"/> + <legendlayer checked="Qt::Checked" drawingOrder="-1" showFeatureCount="0" name="Ortho 20 cm" open="false"> + <filegroup hidden="false" open="false"> + <legendlayerfile layerid="Ortho_20_cm_f8497a68_e819_4170_a2ce_17cc699ac2d2" isInOverview="0" visible="1"/> </filegroup> </legendlayer> </legendgroup> </legend> <mapViewDocks/> - <main-annotation-layer legendPlaceholderImage="" autoRefreshMode="Disabled" maxScale="0" minScale="1e+08" type="annotation" autoRefreshTime="0" refreshOnNotifyMessage="" refreshOnNotifyEnabled="0" styleCategories="AllStyleCategories" hasScaleBasedVisibilityFlag="0"> + <main-annotation-layer minScale="1e+08" refreshOnNotifyMessage="" styleCategories="AllStyleCategories" hasScaleBasedVisibilityFlag="0" maxScale="0" type="annotation" refreshOnNotifyEnabled="0" legendPlaceholderImage="" autoRefreshTime="0" autoRefreshMode="Disabled"> <id>Annotations_61e154b2_8160_463f_af4c_71565a806b89</id> <datasource></datasource> <keywordList> @@ -177,13 +220,579 @@ <paintEffect/> </main-annotation-layer> <projectlayers> - <maplayer geometry="Point" refreshOnNotifyEnabled="0" readOnly="0" autoRefreshTime="0" autoRefreshMode="Disabled" simplifyLocal="1" styleCategories="AllStyleCategories" symbologyReferenceScale="-1" simplifyDrawingTol="1" refreshOnNotifyMessage="" simplifyAlgorithm="0" simplifyDrawingHints="0" simplifyMaxScale="1" labelsEnabled="0" legendPlaceholderImage="" type="vector" minScale="100000000" maxScale="0" wkbType="PointZ" hasScaleBasedVisibilityFlag="0"> - <id>Finds_7595ca92_4128_456d_a700_416cedf9aaa4</id> - <datasource>./Finds.gpkg|layername=Finds</datasource> + <maplayer minScale="100000000" maxScale="0" simplifyMaxScale="1" simplifyDrawingTol="1" simplifyAlgorithm="0" geometry="Polygon" refreshOnNotifyEnabled="0" refreshOnNotifyMessage="" wkbType="MultiPolygon" autoRefreshMode="Disabled" styleCategories="AllStyleCategories" autoRefreshTime="0" simplifyLocal="1" symbologyReferenceScale="-1" labelsEnabled="0" readOnly="0" type="vector" legendPlaceholderImage="" simplifyDrawingHints="1" hasScaleBasedVisibilityFlag="0"> + <id>Communes_4866eaff_96f1_4af8_820c_6a6e1c2a757b</id> + <datasource> pagingEnabled='default' preferCoordinatesForWfsT11='false' restrictToRequestBBOX='1' srsname='EPSG:4326' typename='ADMINEXPRESS-COG.2024:commune' url='https://data.geopf.fr/wfs/ows' url='https://data.geopf.fr/wfs/ows?VERSION=2.0.0' version='auto'</datasource> <keywordList> <value></value> </keywordList> - <layername>Finds</layername> + <layername>Communes</layername> + <srs> + <spatialrefsys nativeFormat="Wkt"> + <wkt>GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]]</wkt> + <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4> + <srsid>3452</srsid> + <srid>4326</srid> + <authid>EPSG:4326</authid> + <description>WGS 84</description> + <projectionacronym>longlat</projectionacronym> + <ellipsoidacronym>EPSG:7030</ellipsoidacronym> + <geographicflag>true</geographicflag> + </spatialrefsys> + </srs> + <resourceMetadata> + <identifier></identifier> + <parentidentifier></parentidentifier> + <language></language> + <type></type> + <title></title> + <abstract></abstract> + <links/> + <dates/> + <fees></fees> + <encoding></encoding> + <crs> + <spatialrefsys nativeFormat="Wkt"> + <wkt></wkt> + <proj4></proj4> + <srsid>0</srsid> + <srid>0</srid> + <authid></authid> + <description></description> + <projectionacronym></projectionacronym> + <ellipsoidacronym></ellipsoidacronym> + <geographicflag>false</geographicflag> + </spatialrefsys> + </crs> + <extent/> + </resourceMetadata> + <provider encoding="">WFS</provider> + <vectorjoins/> + <layerDependencies/> + <dataDependencies/> + <expressionfields/> + <map-layer-style-manager current="défaut"> + <map-layer-style name="défaut"/> + </map-layer-style-manager> + <auxiliaryLayer/> + <metadataUrls/> + <flags> + <Identifiable>1</Identifiable> + <Removable>1</Removable> + <Searchable>1</Searchable> + <Private>0</Private> + </flags> + <temporal endExpression="" accumulate="0" mode="0" endField="" enabled="0" durationField="population" startExpression="" limitMode="0" fixedDuration="0" durationUnit="min" startField=""> + <fixedRange> + <start></start> + <end></end> + </fixedRange> + </temporal> + <elevation extrusionEnabled="0" extrusion="0" zoffset="0" symbology="Line" zscale="1" clamping="Terrain" type="IndividualFeatures" respectLayerSymbol="1" binding="Centroid" showMarkerSymbolInSurfacePlots="0"> + <data-defined-properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data-defined-properties> + <profileLineSymbol> + <symbol force_rhr="0" type="line" name="" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + <layer pass="0" enabled="1" class="SimpleLine" id="{2cccb3e2-5136-4ae5-91ea-975a7f4a7548}" locked="0"> + <Option type="Map"> + <Option type="QString" name="align_dash_pattern" value="0"/> + <Option type="QString" name="capstyle" value="square"/> + <Option type="QString" name="customdash" value="5;2"/> + <Option type="QString" name="customdash_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="customdash_unit" value="MM"/> + <Option type="QString" name="dash_pattern_offset" value="0"/> + <Option type="QString" name="dash_pattern_offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="dash_pattern_offset_unit" value="MM"/> + <Option type="QString" name="draw_inside_polygon" value="0"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="line_color" value="164,113,88,255,rgb:0.64313725490196083,0.44313725490196076,0.34509803921568627,1"/> + <Option type="QString" name="line_style" value="solid"/> + <Option type="QString" name="line_width" value="0.6"/> + <Option type="QString" name="line_width_unit" value="MM"/> + <Option type="QString" name="offset" value="0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="ring_filter" value="0"/> + <Option type="QString" name="trim_distance_end" value="0"/> + <Option type="QString" name="trim_distance_end_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="trim_distance_end_unit" value="MM"/> + <Option type="QString" name="trim_distance_start" value="0"/> + <Option type="QString" name="trim_distance_start_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="trim_distance_start_unit" value="MM"/> + <Option type="QString" name="tweak_dash_pattern_on_corners" value="0"/> + <Option type="QString" name="use_custom_dash" value="0"/> + <Option type="QString" name="width_map_unit_scale" value="3x:0,0,0,0,0,0"/> + </Option> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + </layer> + </symbol> + </profileLineSymbol> + <profileFillSymbol> + <symbol force_rhr="0" type="fill" name="" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + <layer pass="0" enabled="1" class="SimpleFill" id="{77a2f273-86f1-4e78-9600-9079ab6a5ecb}" locked="0"> + <Option type="Map"> + <Option type="QString" name="border_width_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="color" value="164,113,88,255,rgb:0.64313725490196083,0.44313725490196076,0.34509803921568627,1"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="offset" value="0,0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="outline_color" value="117,81,63,255,rgb:0.45937285420004575,0.31653315022507056,0.24649423971923401,1"/> + <Option type="QString" name="outline_style" value="solid"/> + <Option type="QString" name="outline_width" value="0.2"/> + <Option type="QString" name="outline_width_unit" value="MM"/> + <Option type="QString" name="style" value="solid"/> + </Option> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + </layer> + </symbol> + </profileFillSymbol> + <profileMarkerSymbol> + <symbol force_rhr="0" type="marker" name="" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + <layer pass="0" enabled="1" class="SimpleMarker" id="{f4950358-1845-46d7-9946-ae9ae5c46263}" locked="0"> + <Option type="Map"> + <Option type="QString" name="angle" value="0"/> + <Option type="QString" name="cap_style" value="square"/> + <Option type="QString" name="color" value="164,113,88,255,rgb:0.64313725490196083,0.44313725490196076,0.34509803921568627,1"/> + <Option type="QString" name="horizontal_anchor_point" value="1"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="name" value="diamond"/> + <Option type="QString" name="offset" value="0,0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="outline_color" value="117,81,63,255,rgb:0.45937285420004575,0.31653315022507056,0.24649423971923401,1"/> + <Option type="QString" name="outline_style" value="solid"/> + <Option type="QString" name="outline_width" value="0.2"/> + <Option type="QString" name="outline_width_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="outline_width_unit" value="MM"/> + <Option type="QString" name="scale_method" value="diameter"/> + <Option type="QString" name="size" value="3"/> + <Option type="QString" name="size_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="size_unit" value="MM"/> + <Option type="QString" name="vertical_anchor_point" value="1"/> + </Option> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + </layer> + </symbol> + </profileMarkerSymbol> + </elevation> + <renderer-v2 forceraster="0" referencescale="-1" enableorderby="0" type="singleSymbol" symbollevels="0"> + <symbols> + <symbol force_rhr="0" type="fill" name="0" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + <layer pass="0" enabled="1" class="SimpleFill" id="{abe5e89a-5a3b-4401-8d8f-6cd38279c19b}" locked="0"> + <Option type="Map"> + <Option type="QString" name="border_width_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="color" value="133,182,111,255,rgb:0.52156862745098043,0.71372549019607845,0.43529411764705883,1"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="offset" value="0,0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="outline_color" value="35,35,35,255,rgb:0.13725490196078433,0.13725490196078433,0.13725490196078433,1"/> + <Option type="QString" name="outline_style" value="solid"/> + <Option type="QString" name="outline_width" value="0.5"/> + <Option type="QString" name="outline_width_unit" value="MM"/> + <Option type="QString" name="style" value="no"/> + </Option> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + </layer> + </symbol> + </symbols> + <rotation/> + <sizescale/> + <data-defined-properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data-defined-properties> + </renderer-v2> + <selection mode="Default"> + <selectionColor invalid="1"/> + <selectionSymbol> + <symbol force_rhr="0" type="fill" name="" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + <layer pass="0" enabled="1" class="SimpleFill" id="{4e6c353d-a5c8-4349-b244-f0ac89f8255a}" locked="0"> + <Option type="Map"> + <Option type="QString" name="border_width_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="color" value="0,0,255,255,rgb:0,0,1,1"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="offset" value="0,0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="outline_color" value="35,35,35,255,rgb:0.13725490196078433,0.13725490196078433,0.13725490196078433,1"/> + <Option type="QString" name="outline_style" value="solid"/> + <Option type="QString" name="outline_width" value="0.26"/> + <Option type="QString" name="outline_width_unit" value="MM"/> + <Option type="QString" name="style" value="solid"/> + </Option> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + </layer> + </symbol> + </selectionSymbol> + </selection> + <customproperties> + <Option type="Map"> + <Option type="QString" name="QFieldSync/action" value="no_action"/> + <Option type="QString" name="QFieldSync/attachment_naming" value="{}"/> + <Option type="QString" name="QFieldSync/cloud_action" value="offline"/> + <Option type="invalid" name="QFieldSync/geometry_locked_expression"/> + <Option type="QString" name="QFieldSync/photo_naming" value="{}"/> + <Option type="QString" name="QFieldSync/relationship_maximum_visible" value="{}"/> + <Option type="QString" name="QFieldSync/remoteLayerId" value="ADMINEXPRESS_COG_2024_commune_3459e7a6_ab8e_4498_bc4f_744b2f33c728"/> + <Option type="int" name="QFieldSync/tracking_distance_requirement_minimum_meters" value="30"/> + <Option type="int" name="QFieldSync/tracking_erroneous_distance_safeguard_maximum_meters" value="1"/> + <Option type="int" name="QFieldSync/tracking_measurement_type" value="0"/> + <Option type="int" name="QFieldSync/tracking_time_requirement_interval_seconds" value="30"/> + <Option type="int" name="QFieldSync/value_map_button_interface_threshold" value="0"/> + <Option type="List" name="dualview/previewExpressions"> + <Option type="QString" value=""nom""/> + </Option> + <Option type="int" name="embeddedWidgets/count" value="0"/> + <Option type="invalid" name="variableNames"/> + <Option type="invalid" name="variableValues"/> + </Option> + </customproperties> + <blendMode>0</blendMode> + <featureBlendMode>0</featureBlendMode> + <layerOpacity>1</layerOpacity> + <geometryOptions geometryPrecision="0" removeDuplicateNodes="0"> + <activeChecks/> + <checkConfiguration type="Map"> + <Option type="Map" name="QgsGeometryGapCheck"> + <Option type="double" name="allowedGapsBuffer" value="0"/> + <Option type="bool" name="allowedGapsEnabled" value="false"/> + <Option type="invalid" name="allowedGapsLayer"/> + </Option> + </checkConfiguration> + </geometryOptions> + <legend type="default-vector" showLabelLegend="0"/> + <referencedLayers/> + <fieldConfiguration> + <field configurationFlags="NoFlag" name="id"> + <editWidget type="TextEdit"> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="nom"> + <editWidget type="TextEdit"> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="nom_m"> + <editWidget type="TextEdit"> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="insee_com"> + <editWidget type="TextEdit"> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="statut"> + <editWidget type="TextEdit"> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="population"> + <editWidget type="Range"> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="insee_can"> + <editWidget type="TextEdit"> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="insee_arr"> + <editWidget type="TextEdit"> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="insee_dep"> + <editWidget type="TextEdit"> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="insee_reg"> + <editWidget type="TextEdit"> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="siren_epci"> + <editWidget type="TextEdit"> + <config> + <Option/> + </config> + </editWidget> + </field> + </fieldConfiguration> + <aliases> + <alias index="0" name="" field="id"/> + <alias index="1" name="" field="nom"/> + <alias index="2" name="" field="nom_m"/> + <alias index="3" name="" field="insee_com"/> + <alias index="4" name="" field="statut"/> + <alias index="5" name="" field="population"/> + <alias index="6" name="" field="insee_can"/> + <alias index="7" name="" field="insee_arr"/> + <alias index="8" name="" field="insee_dep"/> + <alias index="9" name="" field="insee_reg"/> + <alias index="10" name="" field="siren_epci"/> + </aliases> + <splitPolicies> + <policy policy="Duplicate" field="id"/> + <policy policy="Duplicate" field="nom"/> + <policy policy="Duplicate" field="nom_m"/> + <policy policy="Duplicate" field="insee_com"/> + <policy policy="Duplicate" field="statut"/> + <policy policy="Duplicate" field="population"/> + <policy policy="Duplicate" field="insee_can"/> + <policy policy="Duplicate" field="insee_arr"/> + <policy policy="Duplicate" field="insee_dep"/> + <policy policy="Duplicate" field="insee_reg"/> + <policy policy="Duplicate" field="siren_epci"/> + </splitPolicies> + <duplicatePolicies> + <policy policy="Duplicate" field="id"/> + <policy policy="Duplicate" field="nom"/> + <policy policy="Duplicate" field="nom_m"/> + <policy policy="Duplicate" field="insee_com"/> + <policy policy="Duplicate" field="statut"/> + <policy policy="Duplicate" field="population"/> + <policy policy="Duplicate" field="insee_can"/> + <policy policy="Duplicate" field="insee_arr"/> + <policy policy="Duplicate" field="insee_dep"/> + <policy policy="Duplicate" field="insee_reg"/> + <policy policy="Duplicate" field="siren_epci"/> + </duplicatePolicies> + <defaults> + <default applyOnUpdate="0" expression="" field="id"/> + <default applyOnUpdate="0" expression="" field="nom"/> + <default applyOnUpdate="0" expression="" field="nom_m"/> + <default applyOnUpdate="0" expression="" field="insee_com"/> + <default applyOnUpdate="0" expression="" field="statut"/> + <default applyOnUpdate="0" expression="" field="population"/> + <default applyOnUpdate="0" expression="" field="insee_can"/> + <default applyOnUpdate="0" expression="" field="insee_arr"/> + <default applyOnUpdate="0" expression="" field="insee_dep"/> + <default applyOnUpdate="0" expression="" field="insee_reg"/> + <default applyOnUpdate="0" expression="" field="siren_epci"/> + </defaults> + <constraints> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="id"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="nom"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="nom_m"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="insee_com"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="statut"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="population"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="insee_can"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="insee_arr"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="insee_dep"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="insee_reg"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="siren_epci"/> + </constraints> + <constraintExpressions> + <constraint exp="" desc="" field="id"/> + <constraint exp="" desc="" field="nom"/> + <constraint exp="" desc="" field="nom_m"/> + <constraint exp="" desc="" field="insee_com"/> + <constraint exp="" desc="" field="statut"/> + <constraint exp="" desc="" field="population"/> + <constraint exp="" desc="" field="insee_can"/> + <constraint exp="" desc="" field="insee_arr"/> + <constraint exp="" desc="" field="insee_dep"/> + <constraint exp="" desc="" field="insee_reg"/> + <constraint exp="" desc="" field="siren_epci"/> + </constraintExpressions> + <expressionfields/> + <attributeactions> + <defaultAction key="Canvas" value="{00000000-0000-0000-0000-000000000000}"/> + </attributeactions> + <attributetableconfig sortOrder="0" actionWidgetStyle="dropDown" sortExpression=""> + <columns> + <column type="field" name="id" hidden="0" width="-1"/> + <column type="field" name="nom" hidden="0" width="-1"/> + <column type="field" name="nom_m" hidden="0" width="-1"/> + <column type="field" name="insee_com" hidden="0" width="-1"/> + <column type="field" name="statut" hidden="0" width="-1"/> + <column type="field" name="population" hidden="0" width="-1"/> + <column type="field" name="insee_can" hidden="0" width="-1"/> + <column type="field" name="insee_arr" hidden="0" width="-1"/> + <column type="field" name="insee_dep" hidden="0" width="-1"/> + <column type="field" name="insee_reg" hidden="0" width="-1"/> + <column type="field" name="siren_epci" hidden="0" width="-1"/> + <column type="actions" hidden="1" width="-1"/> + </columns> + </attributetableconfig> + <conditionalstyles> + <rowstyles/> + <fieldstyles/> + </conditionalstyles> + <storedexpressions/> + <editform tolerant="1"></editform> + <editforminit/> + <editforminitcodesource>0</editforminitcodesource> + <editforminitfilepath></editforminitfilepath> + <editforminitcode><![CDATA[# -*- coding: utf-8 -*- +""" +Les formulaires QGIS peuvent avoir une fonction Python qui est appelée lorsque le formulaire est +ouvert. + +Utilisez cette fonction pour ajouter une logique supplémentaire à vos formulaires. + +Entrez le nom de la fonction dans le champ +"Fonction d'initialisation Python". +Voici un exemple: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") +]]></editforminitcode> + <featformsuppress>0</featformsuppress> + <editorlayout>generatedlayout</editorlayout> + <editable> + <field name="id" editable="1"/> + <field name="insee_arr" editable="1"/> + <field name="insee_can" editable="1"/> + <field name="insee_com" editable="1"/> + <field name="insee_dep" editable="1"/> + <field name="insee_reg" editable="1"/> + <field name="nom" editable="1"/> + <field name="nom_m" editable="1"/> + <field name="population" editable="1"/> + <field name="siren_epci" editable="1"/> + <field name="statut" editable="1"/> + </editable> + <labelOnTop> + <field labelOnTop="0" name="id"/> + <field labelOnTop="0" name="insee_arr"/> + <field labelOnTop="0" name="insee_can"/> + <field labelOnTop="0" name="insee_com"/> + <field labelOnTop="0" name="insee_dep"/> + <field labelOnTop="0" name="insee_reg"/> + <field labelOnTop="0" name="nom"/> + <field labelOnTop="0" name="nom_m"/> + <field labelOnTop="0" name="population"/> + <field labelOnTop="0" name="siren_epci"/> + <field labelOnTop="0" name="statut"/> + </labelOnTop> + <reuseLastValue> + <field name="id" reuseLastValue="0"/> + <field name="insee_arr" reuseLastValue="0"/> + <field name="insee_can" reuseLastValue="0"/> + <field name="insee_com" reuseLastValue="0"/> + <field name="insee_dep" reuseLastValue="0"/> + <field name="insee_reg" reuseLastValue="0"/> + <field name="nom" reuseLastValue="0"/> + <field name="nom_m" reuseLastValue="0"/> + <field name="population" reuseLastValue="0"/> + <field name="siren_epci" reuseLastValue="0"/> + <field name="statut" reuseLastValue="0"/> + </reuseLastValue> + <dataDefinedFieldProperties/> + <widgets/> + <previewExpression>"nom"</previewExpression> + <mapTip enabled="1"></mapTip> + </maplayer> + <maplayer minScale="100000000" maxScale="0" simplifyMaxScale="1" simplifyDrawingTol="1" simplifyAlgorithm="0" geometry="Polygon" refreshOnNotifyEnabled="0" refreshOnNotifyMessage="" wkbType="MultiPolygon" autoRefreshMode="Disabled" styleCategories="AllStyleCategories" autoRefreshTime="0" simplifyLocal="1" symbologyReferenceScale="-1" labelsEnabled="0" readOnly="0" type="vector" legendPlaceholderImage="" simplifyDrawingHints="1" hasScaleBasedVisibilityFlag="0"> + <id>Context_records_94782d53_b0c1_4448_9720_44f58c1a13fa</id> + <datasource>./Context_records.gpkg|layername=Context_records</datasource> + <keywordList> + <value></value> + </keywordList> + <layername>Context_records</layername> <srs> <spatialrefsys nativeFormat="Wkt"> <wkt>GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]]</wkt> @@ -231,7 +840,7 @@ </spatialrefsys> </crs> <extent> - <spatial dimensions="2" maxx="-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368" minx="179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368" crs="EPSG:4326" maxy="-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368" miny="179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368" maxz="0" minz="0"/> + <spatial maxx="-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368" maxz="0" dimensions="2" miny="179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368" crs="EPSG:4326" minx="179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368" minz="0" maxy="-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368"/> <temporal> <period> <start></start> @@ -256,181 +865,173 @@ <Searchable>1</Searchable> <Private>0</Private> </flags> - <temporal limitMode="0" durationField="fid" startExpression="" endField="" startField="champ_date" durationUnit="min" enabled="0" accumulate="0" mode="0" fixedDuration="0" endExpression=""> + <temporal endExpression="" accumulate="0" mode="0" endField="" enabled="0" durationField="fid" startExpression="" limitMode="0" fixedDuration="0" durationUnit="min" startField=""> <fixedRange> <start></start> <end></end> </fixedRange> </temporal> - <elevation extrusionEnabled="0" respectLayerSymbol="1" showMarkerSymbolInSurfacePlots="0" type="IndividualFeatures" binding="Centroid" zscale="1" symbology="Line" zoffset="0" extrusion="0" clamping="Relative"> + <elevation extrusionEnabled="0" extrusion="0" zoffset="0" symbology="Line" zscale="1" clamping="Terrain" type="IndividualFeatures" respectLayerSymbol="1" binding="Centroid" showMarkerSymbolInSurfacePlots="0"> <data-defined-properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </data-defined-properties> <profileLineSymbol> - <symbol force_rhr="0" clip_to_extent="1" alpha="1" type="line" name="" is_animated="0" frame_rate="10"> + <symbol force_rhr="0" type="line" name="" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> <data_defined_properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </data_defined_properties> - <layer locked="0" pass="0" class="SimpleLine" enabled="1" id="{0e604244-2679-4405-bcb5-4701e7ff0f5f}"> - <Option type="Map"> - <Option value="0" type="QString" name="align_dash_pattern"/> - <Option value="square" type="QString" name="capstyle"/> - <Option value="5;2" type="QString" name="customdash"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="customdash_map_unit_scale"/> - <Option value="MM" type="QString" name="customdash_unit"/> - <Option value="0" type="QString" name="dash_pattern_offset"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="dash_pattern_offset_map_unit_scale"/> - <Option value="MM" type="QString" name="dash_pattern_offset_unit"/> - <Option value="0" type="QString" name="draw_inside_polygon"/> - <Option value="bevel" type="QString" name="joinstyle"/> - <Option value="213,180,60,255,rgb:0.83529411764705885,0.70588235294117652,0.23529411764705882,1" type="QString" name="line_color"/> - <Option value="solid" type="QString" name="line_style"/> - <Option value="0.6" type="QString" name="line_width"/> - <Option value="MM" type="QString" name="line_width_unit"/> - <Option value="0" type="QString" name="offset"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="offset_map_unit_scale"/> - <Option value="MM" type="QString" name="offset_unit"/> - <Option value="0" type="QString" name="ring_filter"/> - <Option value="0" type="QString" name="trim_distance_end"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="trim_distance_end_map_unit_scale"/> - <Option value="MM" type="QString" name="trim_distance_end_unit"/> - <Option value="0" type="QString" name="trim_distance_start"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="trim_distance_start_map_unit_scale"/> - <Option value="MM" type="QString" name="trim_distance_start_unit"/> - <Option value="0" type="QString" name="tweak_dash_pattern_on_corners"/> - <Option value="0" type="QString" name="use_custom_dash"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="width_map_unit_scale"/> + <layer pass="0" enabled="1" class="SimpleLine" id="{0ed4b031-e238-4569-8d63-474296c441a4}" locked="0"> + <Option type="Map"> + <Option type="QString" name="align_dash_pattern" value="0"/> + <Option type="QString" name="capstyle" value="square"/> + <Option type="QString" name="customdash" value="5;2"/> + <Option type="QString" name="customdash_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="customdash_unit" value="MM"/> + <Option type="QString" name="dash_pattern_offset" value="0"/> + <Option type="QString" name="dash_pattern_offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="dash_pattern_offset_unit" value="MM"/> + <Option type="QString" name="draw_inside_polygon" value="0"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="line_color" value="225,89,137,255,rgb:0.88235294117647056,0.34901960784313724,0.53725490196078429,1"/> + <Option type="QString" name="line_style" value="solid"/> + <Option type="QString" name="line_width" value="0.6"/> + <Option type="QString" name="line_width_unit" value="MM"/> + <Option type="QString" name="offset" value="0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="ring_filter" value="0"/> + <Option type="QString" name="trim_distance_end" value="0"/> + <Option type="QString" name="trim_distance_end_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="trim_distance_end_unit" value="MM"/> + <Option type="QString" name="trim_distance_start" value="0"/> + <Option type="QString" name="trim_distance_start_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="trim_distance_start_unit" value="MM"/> + <Option type="QString" name="tweak_dash_pattern_on_corners" value="0"/> + <Option type="QString" name="use_custom_dash" value="0"/> + <Option type="QString" name="width_map_unit_scale" value="3x:0,0,0,0,0,0"/> </Option> <data_defined_properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </data_defined_properties> </layer> </symbol> </profileLineSymbol> <profileFillSymbol> - <symbol force_rhr="0" clip_to_extent="1" alpha="1" type="fill" name="" is_animated="0" frame_rate="10"> + <symbol force_rhr="0" type="fill" name="" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> <data_defined_properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </data_defined_properties> - <layer locked="0" pass="0" class="SimpleFill" enabled="1" id="{daa6a3e5-1f01-4487-bf4f-1c447419415c}"> - <Option type="Map"> - <Option value="3x:0,0,0,0,0,0" type="QString" name="border_width_map_unit_scale"/> - <Option value="213,180,60,255,rgb:0.83529411764705885,0.70588235294117652,0.23529411764705882,1" type="QString" name="color"/> - <Option value="bevel" type="QString" name="joinstyle"/> - <Option value="0,0" type="QString" name="offset"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="offset_map_unit_scale"/> - <Option value="MM" type="QString" name="offset_unit"/> - <Option value="152,129,43,255,rgb:0.59662775616083008,0.50420386053253985,0.1680628671702144,1" type="QString" name="outline_color"/> - <Option value="solid" type="QString" name="outline_style"/> - <Option value="0.2" type="QString" name="outline_width"/> - <Option value="MM" type="QString" name="outline_width_unit"/> - <Option value="solid" type="QString" name="style"/> + <layer pass="0" enabled="1" class="SimpleFill" id="{6e2bf347-4959-4c63-abd5-cf5326a04602}" locked="0"> + <Option type="Map"> + <Option type="QString" name="border_width_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="color" value="225,89,137,255,rgb:0.88235294117647056,0.34901960784313724,0.53725490196078429,1"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="offset" value="0,0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="outline_color" value="161,64,98,255,rgb:0.63024338139925229,0.24930189974822614,0.38377965972381173,1"/> + <Option type="QString" name="outline_style" value="solid"/> + <Option type="QString" name="outline_width" value="0.2"/> + <Option type="QString" name="outline_width_unit" value="MM"/> + <Option type="QString" name="style" value="solid"/> </Option> <data_defined_properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </data_defined_properties> </layer> </symbol> </profileFillSymbol> <profileMarkerSymbol> - <symbol force_rhr="0" clip_to_extent="1" alpha="1" type="marker" name="" is_animated="0" frame_rate="10"> + <symbol force_rhr="0" type="marker" name="" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> <data_defined_properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </data_defined_properties> - <layer locked="0" pass="0" class="SimpleMarker" enabled="1" id="{e9c5e175-35b4-4e7e-a297-f58c3427362e}"> - <Option type="Map"> - <Option value="0" type="QString" name="angle"/> - <Option value="square" type="QString" name="cap_style"/> - <Option value="213,180,60,255,rgb:0.83529411764705885,0.70588235294117652,0.23529411764705882,1" type="QString" name="color"/> - <Option value="1" type="QString" name="horizontal_anchor_point"/> - <Option value="bevel" type="QString" name="joinstyle"/> - <Option value="diamond" type="QString" name="name"/> - <Option value="0,0" type="QString" name="offset"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="offset_map_unit_scale"/> - <Option value="MM" type="QString" name="offset_unit"/> - <Option value="152,129,43,255,rgb:0.59662775616083008,0.50420386053253985,0.1680628671702144,1" type="QString" name="outline_color"/> - <Option value="solid" type="QString" name="outline_style"/> - <Option value="0.2" type="QString" name="outline_width"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="outline_width_map_unit_scale"/> - <Option value="MM" type="QString" name="outline_width_unit"/> - <Option value="diameter" type="QString" name="scale_method"/> - <Option value="3" type="QString" name="size"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="size_map_unit_scale"/> - <Option value="MM" type="QString" name="size_unit"/> - <Option value="1" type="QString" name="vertical_anchor_point"/> + <layer pass="0" enabled="1" class="SimpleMarker" id="{ce637702-cd57-453f-b64d-85880317d8bf}" locked="0"> + <Option type="Map"> + <Option type="QString" name="angle" value="0"/> + <Option type="QString" name="cap_style" value="square"/> + <Option type="QString" name="color" value="225,89,137,255,rgb:0.88235294117647056,0.34901960784313724,0.53725490196078429,1"/> + <Option type="QString" name="horizontal_anchor_point" value="1"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="name" value="diamond"/> + <Option type="QString" name="offset" value="0,0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="outline_color" value="161,64,98,255,rgb:0.63024338139925229,0.24930189974822614,0.38377965972381173,1"/> + <Option type="QString" name="outline_style" value="solid"/> + <Option type="QString" name="outline_width" value="0.2"/> + <Option type="QString" name="outline_width_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="outline_width_unit" value="MM"/> + <Option type="QString" name="scale_method" value="diameter"/> + <Option type="QString" name="size" value="3"/> + <Option type="QString" name="size_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="size_unit" value="MM"/> + <Option type="QString" name="vertical_anchor_point" value="1"/> </Option> <data_defined_properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </data_defined_properties> </layer> </symbol> </profileMarkerSymbol> </elevation> - <renderer-v2 enableorderby="0" symbollevels="0" referencescale="-1" type="singleSymbol" forceraster="0"> + <renderer-v2 forceraster="0" referencescale="-1" enableorderby="0" type="singleSymbol" symbollevels="0"> <symbols> - <symbol force_rhr="0" clip_to_extent="1" alpha="1" type="marker" name="0" is_animated="0" frame_rate="10"> + <symbol force_rhr="0" type="fill" name="0" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> <data_defined_properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </data_defined_properties> - <layer locked="0" pass="0" class="SimpleMarker" enabled="1" id="{d4d2458c-5070-44b4-8b16-7704a2b29174}"> - <Option type="Map"> - <Option value="0" type="QString" name="angle"/> - <Option value="square" type="QString" name="cap_style"/> - <Option value="219,30,42,255,rgb:0.85882352941176465,0.11764705882352941,0.16470588235294117,1" type="QString" name="color"/> - <Option value="1" type="QString" name="horizontal_anchor_point"/> - <Option value="bevel" type="QString" name="joinstyle"/> - <Option value="circle" type="QString" name="name"/> - <Option value="0,0" type="QString" name="offset"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="offset_map_unit_scale"/> - <Option value="MM" type="QString" name="offset_unit"/> - <Option value="0,0,0,255,rgb:0,0,0,1" type="QString" name="outline_color"/> - <Option value="solid" type="QString" name="outline_style"/> - <Option value="0.4" type="QString" name="outline_width"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="outline_width_map_unit_scale"/> - <Option value="MM" type="QString" name="outline_width_unit"/> - <Option value="diameter" type="QString" name="scale_method"/> - <Option value="4" type="QString" name="size"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="size_map_unit_scale"/> - <Option value="MM" type="QString" name="size_unit"/> - <Option value="1" type="QString" name="vertical_anchor_point"/> + <layer pass="0" enabled="1" class="SimpleFill" id="{d9e81063-39a4-450e-b089-1cea7b0f62a3}" locked="0"> + <Option type="Map"> + <Option type="QString" name="border_width_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="color" value="125,139,143,64,rgb:0.49019607843137253,0.54509803921568623,0.5607843137254902,0.25000381475547417"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="offset" value="0,0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="outline_color" value="227,26,28,255,rgb:0.8901960784313725,0.10196078431372549,0.10980392156862745,1"/> + <Option type="QString" name="outline_style" value="dash"/> + <Option type="QString" name="outline_width" value="1"/> + <Option type="QString" name="outline_width_unit" value="MM"/> + <Option type="QString" name="style" value="diagonal_x"/> </Option> <data_defined_properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </data_defined_properties> </layer> @@ -440,50 +1041,42 @@ <sizescale/> <data-defined-properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </data-defined-properties> </renderer-v2> <selection mode="Default"> <selectionColor invalid="1"/> <selectionSymbol> - <symbol force_rhr="0" clip_to_extent="1" alpha="1" type="marker" name="" is_animated="0" frame_rate="10"> + <symbol force_rhr="0" type="fill" name="" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> <data_defined_properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </data_defined_properties> - <layer locked="0" pass="0" class="SimpleMarker" enabled="1" id="{11e497de-d80c-447a-90ea-4868bf8b3c9d}"> - <Option type="Map"> - <Option value="0" type="QString" name="angle"/> - <Option value="square" type="QString" name="cap_style"/> - <Option value="255,0,0,255,rgb:1,0,0,1" type="QString" name="color"/> - <Option value="1" type="QString" name="horizontal_anchor_point"/> - <Option value="bevel" type="QString" name="joinstyle"/> - <Option value="circle" type="QString" name="name"/> - <Option value="0,0" type="QString" name="offset"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="offset_map_unit_scale"/> - <Option value="MM" type="QString" name="offset_unit"/> - <Option value="35,35,35,255,rgb:0.13725490196078433,0.13725490196078433,0.13725490196078433,1" type="QString" name="outline_color"/> - <Option value="solid" type="QString" name="outline_style"/> - <Option value="0" type="QString" name="outline_width"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="outline_width_map_unit_scale"/> - <Option value="MM" type="QString" name="outline_width_unit"/> - <Option value="diameter" type="QString" name="scale_method"/> - <Option value="2" type="QString" name="size"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="size_map_unit_scale"/> - <Option value="MM" type="QString" name="size_unit"/> - <Option value="1" type="QString" name="vertical_anchor_point"/> + <layer pass="0" enabled="1" class="SimpleFill" id="{f93f485c-7d8c-4d3a-bf15-32f1d9d62b51}" locked="0"> + <Option type="Map"> + <Option type="QString" name="border_width_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="color" value="0,0,255,255,rgb:0,0,1,1"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="offset" value="0,0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="outline_color" value="35,35,35,255,rgb:0.13725490196078433,0.13725490196078433,0.13725490196078433,1"/> + <Option type="QString" name="outline_style" value="solid"/> + <Option type="QString" name="outline_width" value="0.26"/> + <Option type="QString" name="outline_width_unit" value="MM"/> + <Option type="QString" name="style" value="solid"/> </Option> <data_defined_properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </data_defined_properties> </layer> @@ -492,23 +1085,21 @@ </selection> <customproperties> <Option type="Map"> - <Option value="copy" type="QString" name="QFieldSync/action"/> - <Option value="{"champ_media": "'DCIM/support_' || format_date(now(),'yyyyMMddhhmmsszzz') || '.{extension}'"}" type="QString" name="QFieldSync/attachment_naming"/> - <Option value="offline" type="QString" name="QFieldSync/cloud_action"/> + <Option type="QString" name="QFieldSync/action" value="copy"/> + <Option type="QString" name="QFieldSync/attachment_naming" value="{"champ_media_cr": "'DCIM/support_' || format_date(now(),'yyyyMMddhhmmsszzz') || '.{extension}'"}"/> + <Option type="QString" name="QFieldSync/cloud_action" value="offline"/> <Option type="invalid" name="QFieldSync/geometry_locked_expression"/> - <Option value="{"champ_media": "'DCIM/support_' || format_date(now(),'yyyyMMddhhmmsszzz') || '.{extension}'"}" type="QString" name="QFieldSync/photo_naming"/> - <Option value="{}" type="QString" name="QFieldSync/relationship_maximum_visible"/> - <Option value="Support_920d875a_c96c_44bd_a775_da5094508e21" type="QString" name="QFieldSync/remoteLayerId"/> - <Option value="fid" type="QString" name="QFieldSync/sourceDataPrimaryKeys"/> - <Option value="30" type="int" name="QFieldSync/tracking_distance_requirement_minimum_meters"/> - <Option value="1" type="int" name="QFieldSync/tracking_erroneous_distance_safeguard_maximum_meters"/> - <Option value="0" type="int" name="QFieldSync/tracking_measurement_type"/> - <Option value="30" type="int" name="QFieldSync/tracking_time_requirement_interval_seconds"/> - <Option value="0" type="int" name="QFieldSync/value_map_button_interface_threshold"/> + <Option type="QString" name="QFieldSync/photo_naming" value="{"champ_media_cr": "'DCIM/support_' || format_date(now(),'yyyyMMddhhmmsszzz') || '.{extension}'"}"/> + <Option type="QString" name="QFieldSync/relationship_maximum_visible" value="{}"/> + <Option type="int" name="QFieldSync/tracking_distance_requirement_minimum_meters" value="30"/> + <Option type="int" name="QFieldSync/tracking_erroneous_distance_safeguard_maximum_meters" value="1"/> + <Option type="int" name="QFieldSync/tracking_measurement_type" value="0"/> + <Option type="int" name="QFieldSync/tracking_time_requirement_interval_seconds" value="30"/> + <Option type="int" name="QFieldSync/value_map_button_interface_threshold" value="0"/> <Option type="List" name="dualview/previewExpressions"> - <Option value=""champ_id"" type="QString"/> + <Option type="QString" value=""description""/> </Option> - <Option value="0" type="int" name="embeddedWidgets/count"/> + <Option type="int" name="embeddedWidgets/count" value="0"/> <Option type="invalid" name="variableNames"/> <Option type="invalid" name="variableValues"/> </Option> @@ -516,130 +1107,847 @@ <blendMode>0</blendMode> <featureBlendMode>0</featureBlendMode> <layerOpacity>1</layerOpacity> - <geometryOptions removeDuplicateNodes="0" geometryPrecision="0"> + <geometryOptions geometryPrecision="0" removeDuplicateNodes="0"> + <activeChecks/> + <checkConfiguration type="Map"> + <Option type="Map" name="QgsGeometryGapCheck"> + <Option type="double" name="allowedGapsBuffer" value="0"/> + <Option type="bool" name="allowedGapsEnabled" value="false"/> + <Option type="invalid" name="allowedGapsLayer"/> + </Option> + </checkConfiguration> + </geometryOptions> + <legend type="default-vector" showLabelLegend="0"/> + <referencedLayers/> + <fieldConfiguration> + <field configurationFlags="NoFlag" name="fid"> + <editWidget type="TextEdit"> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="champ_nom"> + <editWidget type="TextEdit"> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="champ_ope"> + <editWidget type="ValueMap"> + <config> + <Option type="Map"> + <Option type="List" name="map"> + <Option type="Map"> + <Option type="QString" name="Test_choice" value="Test_choice"/> + </Option> + </Option> + </Option> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="champ_insee"> + <editWidget type="TextEdit"> + <config> + <Option type="Map"> + <Option type="bool" name="IsMultiline" value="false"/> + <Option type="bool" name="UseHtml" value="false"/> + </Option> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="champ_parc"> + <editWidget type="TextEdit"> + <config> + <Option type="Map"> + <Option type="bool" name="IsMultiline" value="false"/> + <Option type="bool" name="UseHtml" value="false"/> + </Option> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="champ_type"> + <editWidget type="TextEdit"> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="champ_occup"> + <editWidget type="TextEdit"> + <config> + <Option type="Map"> + <Option type="bool" name="IsMultiline" value="false"/> + <Option type="bool" name="UseHtml" value="false"/> + </Option> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="champ_desc"> + <editWidget type="TextEdit"> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="champ_loca"> + <editWidget type="TextEdit"> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="champ_media_cr"> + <editWidget type="ExternalResource"> + <config> + <Option type="Map"> + <Option type="int" name="DocumentViewer" value="1"/> + <Option type="int" name="DocumentViewerHeight" value="0"/> + <Option type="int" name="DocumentViewerWidth" value="0"/> + <Option type="bool" name="FileWidget" value="true"/> + <Option type="bool" name="FileWidgetButton" value="true"/> + <Option type="invalid" name="FileWidgetFilter"/> + <Option type="Map" name="PropertyCollection"> + <Option type="invalid" name="name"/> + <Option type="invalid" name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + <Option type="int" name="RelativeStorage" value="0"/> + <Option type="invalid" name="StorageAuthConfigId"/> + <Option type="int" name="StorageMode" value="0"/> + <Option type="invalid" name="StorageType"/> + </Option> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="champ_periode"> + <editWidget type="TextEdit"> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="champ_acti"> + <editWidget type="TextEdit"> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="champ_geom"> + <editWidget type="TextEdit"> + <config> + <Option/> + </config> + </editWidget> + </field> + </fieldConfiguration> + <aliases> + <alias index="0" name="" field="fid"/> + <alias index="1" name="" field="champ_nom"/> + <alias index="2" name="" field="champ_ope"/> + <alias index="3" name="" field="champ_insee"/> + <alias index="4" name="" field="champ_parc"/> + <alias index="5" name="" field="champ_type"/> + <alias index="6" name="" field="champ_occup"/> + <alias index="7" name="" field="champ_desc"/> + <alias index="8" name="" field="champ_loca"/> + <alias index="9" name="" field="champ_media_cr"/> + <alias index="10" name="" field="champ_periode"/> + <alias index="11" name="" field="champ_acti"/> + <alias index="12" name="" field="champ_geom"/> + </aliases> + <splitPolicies> + <policy policy="Duplicate" field="fid"/> + <policy policy="Duplicate" field="champ_nom"/> + <policy policy="Duplicate" field="champ_ope"/> + <policy policy="Duplicate" field="champ_insee"/> + <policy policy="Duplicate" field="champ_parc"/> + <policy policy="Duplicate" field="champ_type"/> + <policy policy="Duplicate" field="champ_occup"/> + <policy policy="Duplicate" field="champ_desc"/> + <policy policy="Duplicate" field="champ_loca"/> + <policy policy="Duplicate" field="champ_media_cr"/> + <policy policy="Duplicate" field="champ_periode"/> + <policy policy="Duplicate" field="champ_acti"/> + <policy policy="Duplicate" field="champ_geom"/> + </splitPolicies> + <duplicatePolicies> + <policy policy="Duplicate" field="fid"/> + <policy policy="Duplicate" field="champ_nom"/> + <policy policy="Duplicate" field="champ_ope"/> + <policy policy="Duplicate" field="champ_insee"/> + <policy policy="Duplicate" field="champ_parc"/> + <policy policy="Duplicate" field="champ_type"/> + <policy policy="Duplicate" field="champ_occup"/> + <policy policy="Duplicate" field="champ_desc"/> + <policy policy="Duplicate" field="champ_loca"/> + <policy policy="Duplicate" field="champ_media_cr"/> + <policy policy="Duplicate" field="champ_periode"/> + <policy policy="Duplicate" field="champ_acti"/> + <policy policy="Duplicate" field="champ_geom"/> + </duplicatePolicies> + <defaults> + <default applyOnUpdate="0" expression="" field="fid"/> + <default applyOnUpdate="0" expression="" field="champ_nom"/> + <default applyOnUpdate="0" expression="" field="champ_ope"/> + <default applyOnUpdate="1" expression="replace(array_to_string(array_distinct(overlay_intersects( 'Communes', insee_com))),',',';')" field="champ_insee"/> + <default applyOnUpdate="1" expression="replace(array_to_string(array_distinct(overlay_intersects( 'Parcelles', section || right(numero,3)))),',',';')" field="champ_parc"/> + <default applyOnUpdate="0" expression="" field="champ_type"/> + <default applyOnUpdate="0" expression="" field="champ_occup"/> + <default applyOnUpdate="0" expression="" field="champ_desc"/> + <default applyOnUpdate="0" expression="" field="champ_loca"/> + <default applyOnUpdate="0" expression="" field="champ_media_cr"/> + <default applyOnUpdate="0" expression="" field="champ_periode"/> + <default applyOnUpdate="0" expression="" field="champ_acti"/> + <default applyOnUpdate="0" expression=" CASE
 WHEN geom_to_wkt(@geometry) LIKE 'MultiPolygon ((%'
 THEN geom_to_wkt(@geometry)
 ELSE replace(replace(geom_to_wkt(@geometry), 'Polygon (', 'MultiPolygon (('), '))', ')))')
 END
" field="champ_geom"/> + </defaults> + <constraints> + <constraint unique_strength="1" exp_strength="0" constraints="3" notnull_strength="1" field="fid"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="champ_nom"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="champ_ope"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="champ_insee"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="champ_parc"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="champ_type"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="champ_occup"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="champ_desc"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="champ_loca"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="champ_media_cr"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="champ_periode"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="champ_acti"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="champ_geom"/> + </constraints> + <constraintExpressions> + <constraint exp="" desc="" field="fid"/> + <constraint exp="" desc="" field="champ_nom"/> + <constraint exp="" desc="" field="champ_ope"/> + <constraint exp="" desc="" field="champ_insee"/> + <constraint exp="" desc="" field="champ_parc"/> + <constraint exp="" desc="" field="champ_type"/> + <constraint exp="" desc="" field="champ_occup"/> + <constraint exp="" desc="" field="champ_desc"/> + <constraint exp="" desc="" field="champ_loca"/> + <constraint exp="" desc="" field="champ_media_cr"/> + <constraint exp="" desc="" field="champ_periode"/> + <constraint exp="" desc="" field="champ_acti"/> + <constraint exp="" desc="" field="champ_geom"/> + </constraintExpressions> + <expressionfields/> + <attributeactions> + <defaultAction key="Canvas" value="{00000000-0000-0000-0000-000000000000}"/> + </attributeactions> + <attributetableconfig sortOrder="0" actionWidgetStyle="dropDown" sortExpression=""> + <columns> + <column type="field" name="fid" hidden="0" width="-1"/> + <column type="field" name="champ_nom" hidden="0" width="-1"/> + <column type="field" name="champ_ope" hidden="0" width="-1"/> + <column type="field" name="champ_insee" hidden="0" width="-1"/> + <column type="field" name="champ_parc" hidden="0" width="-1"/> + <column type="field" name="champ_occup" hidden="0" width="-1"/> + <column type="field" name="champ_loca" hidden="0" width="-1"/> + <column type="field" name="champ_media_cr" hidden="0" width="-1"/> + <column type="field" name="champ_periode" hidden="0" width="-1"/> + <column type="field" name="champ_acti" hidden="0" width="-1"/> + <column type="field" name="champ_type" hidden="0" width="-1"/> + <column type="field" name="champ_desc" hidden="0" width="-1"/> + <column type="field" name="champ_geom" hidden="0" width="-1"/> + <column type="actions" hidden="1" width="-1"/> + </columns> + </attributetableconfig> + <conditionalstyles> + <rowstyles/> + <fieldstyles/> + </conditionalstyles> + <storedexpressions/> + <editform tolerant="1"></editform> + <editforminit/> + <editforminitcodesource>0</editforminitcodesource> + <editforminitfilepath></editforminitfilepath> + <editforminitcode><![CDATA[# -*- coding: utf-8 -*- +""" +Les formulaires QGIS peuvent avoir une fonction Python qui est appelée lorsque le formulaire est +ouvert. + +Utilisez cette fonction pour ajouter une logique supplémentaire à vos formulaires. + +Entrez le nom de la fonction dans le champ +"Fonction d'initialisation Python". +Voici un exemple: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") +]]></editforminitcode> + <featformsuppress>0</featformsuppress> + <editorlayout>generatedlayout</editorlayout> + <editable> + <field name="activite" editable="1"/> + <field name="activite_site" editable="1"/> + <field name="champ_acti" editable="1"/> + <field name="champ_desc" editable="1"/> + <field name="champ_descr" editable="1"/> + <field name="champ_geom" editable="1"/> + <field name="champ_insee" editable="1"/> + <field name="champ_loca" editable="1"/> + <field name="champ_media_cr" editable="1"/> + <field name="champ_nom" editable="1"/> + <field name="champ_occup" editable="1"/> + <field name="champ_ope" editable="1"/> + <field name="champ_parc" editable="1"/> + <field name="champ_periode" editable="1"/> + <field name="champ_type" editable="1"/> + <field name="champ_wkt" editable="1"/> + <field name="description" editable="1"/> + <field name="fid" editable="1"/> + <field name="insee_com" editable="1"/> + <field name="localisation" editable="1"/> + <field name="media" editable="1"/> + <field name="nom" editable="1"/> + <field name="operation" editable="1"/> + <field name="parcelles" editable="1"/> + <field name="periode" editable="1"/> + <field name="type" editable="1"/> + <field name="type_occupation" editable="1"/> + </editable> + <labelOnTop> + <field labelOnTop="0" name="activite"/> + <field labelOnTop="0" name="activite_site"/> + <field labelOnTop="0" name="champ_acti"/> + <field labelOnTop="0" name="champ_desc"/> + <field labelOnTop="0" name="champ_descr"/> + <field labelOnTop="0" name="champ_geom"/> + <field labelOnTop="0" name="champ_insee"/> + <field labelOnTop="0" name="champ_loca"/> + <field labelOnTop="0" name="champ_media_cr"/> + <field labelOnTop="0" name="champ_nom"/> + <field labelOnTop="0" name="champ_occup"/> + <field labelOnTop="0" name="champ_ope"/> + <field labelOnTop="0" name="champ_parc"/> + <field labelOnTop="0" name="champ_periode"/> + <field labelOnTop="0" name="champ_type"/> + <field labelOnTop="0" name="champ_wkt"/> + <field labelOnTop="0" name="description"/> + <field labelOnTop="0" name="fid"/> + <field labelOnTop="0" name="insee_com"/> + <field labelOnTop="0" name="localisation"/> + <field labelOnTop="0" name="media"/> + <field labelOnTop="0" name="nom"/> + <field labelOnTop="0" name="operation"/> + <field labelOnTop="0" name="parcelles"/> + <field labelOnTop="0" name="periode"/> + <field labelOnTop="0" name="type"/> + <field labelOnTop="0" name="type_occupation"/> + </labelOnTop> + <reuseLastValue> + <field name="activite" reuseLastValue="0"/> + <field name="activite_site" reuseLastValue="0"/> + <field name="champ_acti" reuseLastValue="0"/> + <field name="champ_desc" reuseLastValue="0"/> + <field name="champ_descr" reuseLastValue="0"/> + <field name="champ_geom" reuseLastValue="0"/> + <field name="champ_insee" reuseLastValue="0"/> + <field name="champ_loca" reuseLastValue="0"/> + <field name="champ_media_cr" reuseLastValue="0"/> + <field name="champ_nom" reuseLastValue="0"/> + <field name="champ_occup" reuseLastValue="0"/> + <field name="champ_ope" reuseLastValue="0"/> + <field name="champ_parc" reuseLastValue="0"/> + <field name="champ_periode" reuseLastValue="0"/> + <field name="champ_type" reuseLastValue="0"/> + <field name="champ_wkt" reuseLastValue="0"/> + <field name="description" reuseLastValue="0"/> + <field name="fid" reuseLastValue="0"/> + <field name="insee_com" reuseLastValue="0"/> + <field name="localisation" reuseLastValue="0"/> + <field name="media" reuseLastValue="0"/> + <field name="nom" reuseLastValue="0"/> + <field name="operation" reuseLastValue="0"/> + <field name="parcelles" reuseLastValue="0"/> + <field name="periode" reuseLastValue="0"/> + <field name="type" reuseLastValue="0"/> + <field name="type_occupation" reuseLastValue="0"/> + </reuseLastValue> + <dataDefinedFieldProperties/> + <widgets/> + <previewExpression>"description"</previewExpression> + <mapTip enabled="1"></mapTip> + </maplayer> + <maplayer minScale="100000000" maxScale="0" simplifyMaxScale="1" simplifyDrawingTol="1" simplifyAlgorithm="0" geometry="Point" refreshOnNotifyEnabled="0" refreshOnNotifyMessage="" wkbType="PointZ" autoRefreshMode="Disabled" styleCategories="AllStyleCategories" autoRefreshTime="0" simplifyLocal="1" symbologyReferenceScale="-1" labelsEnabled="0" readOnly="0" type="vector" legendPlaceholderImage="" simplifyDrawingHints="0" hasScaleBasedVisibilityFlag="0"> + <id>Finds_7595ca92_4128_456d_a700_416cedf9aaa4</id> + <datasource>./Finds.gpkg|layername=Finds</datasource> + <keywordList> + <value></value> + </keywordList> + <layername>Finds</layername> + <srs> + <spatialrefsys nativeFormat="Wkt"> + <wkt>GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]]</wkt> + <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4> + <srsid>3452</srsid> + <srid>4326</srid> + <authid>EPSG:4326</authid> + <description>WGS 84</description> + <projectionacronym>longlat</projectionacronym> + <ellipsoidacronym>EPSG:7030</ellipsoidacronym> + <geographicflag>true</geographicflag> + </spatialrefsys> + </srs> + <resourceMetadata> + <identifier></identifier> + <parentidentifier></parentidentifier> + <language></language> + <type>dataset</type> + <title></title> + <abstract></abstract> + <contact> + <name></name> + <organization></organization> + <position></position> + <voice></voice> + <fax></fax> + <email></email> + <role></role> + </contact> + <links/> + <dates/> + <fees></fees> + <encoding></encoding> + <crs> + <spatialrefsys nativeFormat="Wkt"> + <wkt>GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]]</wkt> + <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4> + <srsid>3452</srsid> + <srid>4326</srid> + <authid>EPSG:4326</authid> + <description>WGS 84</description> + <projectionacronym>longlat</projectionacronym> + <ellipsoidacronym>EPSG:7030</ellipsoidacronym> + <geographicflag>true</geographicflag> + </spatialrefsys> + </crs> + <extent> + <spatial maxx="-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368" maxz="0" dimensions="2" miny="179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368" crs="EPSG:4326" minx="179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368" minz="0" maxy="-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368"/> + <temporal> + <period> + <start></start> + <end></end> + </period> + </temporal> + </extent> + </resourceMetadata> + <provider encoding="UTF-8">ogr</provider> + <vectorjoins/> + <layerDependencies/> + <dataDependencies/> + <expressionfields/> + <map-layer-style-manager current="défaut"> + <map-layer-style name="défaut"/> + </map-layer-style-manager> + <auxiliaryLayer/> + <metadataUrls/> + <flags> + <Identifiable>1</Identifiable> + <Removable>1</Removable> + <Searchable>1</Searchable> + <Private>0</Private> + </flags> + <temporal endExpression="" accumulate="0" mode="0" endField="" enabled="0" durationField="fid" startExpression="" limitMode="0" fixedDuration="0" durationUnit="min" startField="champ_date"> + <fixedRange> + <start></start> + <end></end> + </fixedRange> + </temporal> + <elevation extrusionEnabled="0" extrusion="0" zoffset="0" symbology="Line" zscale="1" clamping="Relative" type="IndividualFeatures" respectLayerSymbol="1" binding="Centroid" showMarkerSymbolInSurfacePlots="0"> + <data-defined-properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data-defined-properties> + <profileLineSymbol> + <symbol force_rhr="0" type="line" name="" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + <layer pass="0" enabled="1" class="SimpleLine" id="{0e604244-2679-4405-bcb5-4701e7ff0f5f}" locked="0"> + <Option type="Map"> + <Option type="QString" name="align_dash_pattern" value="0"/> + <Option type="QString" name="capstyle" value="square"/> + <Option type="QString" name="customdash" value="5;2"/> + <Option type="QString" name="customdash_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="customdash_unit" value="MM"/> + <Option type="QString" name="dash_pattern_offset" value="0"/> + <Option type="QString" name="dash_pattern_offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="dash_pattern_offset_unit" value="MM"/> + <Option type="QString" name="draw_inside_polygon" value="0"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="line_color" value="213,180,60,255,rgb:0.83529411764705885,0.70588235294117652,0.23529411764705882,1"/> + <Option type="QString" name="line_style" value="solid"/> + <Option type="QString" name="line_width" value="0.6"/> + <Option type="QString" name="line_width_unit" value="MM"/> + <Option type="QString" name="offset" value="0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="ring_filter" value="0"/> + <Option type="QString" name="trim_distance_end" value="0"/> + <Option type="QString" name="trim_distance_end_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="trim_distance_end_unit" value="MM"/> + <Option type="QString" name="trim_distance_start" value="0"/> + <Option type="QString" name="trim_distance_start_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="trim_distance_start_unit" value="MM"/> + <Option type="QString" name="tweak_dash_pattern_on_corners" value="0"/> + <Option type="QString" name="use_custom_dash" value="0"/> + <Option type="QString" name="width_map_unit_scale" value="3x:0,0,0,0,0,0"/> + </Option> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + </layer> + </symbol> + </profileLineSymbol> + <profileFillSymbol> + <symbol force_rhr="0" type="fill" name="" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + <layer pass="0" enabled="1" class="SimpleFill" id="{daa6a3e5-1f01-4487-bf4f-1c447419415c}" locked="0"> + <Option type="Map"> + <Option type="QString" name="border_width_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="color" value="213,180,60,255,rgb:0.83529411764705885,0.70588235294117652,0.23529411764705882,1"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="offset" value="0,0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="outline_color" value="152,129,43,255,rgb:0.59662775616083008,0.50420386053253985,0.1680628671702144,1"/> + <Option type="QString" name="outline_style" value="solid"/> + <Option type="QString" name="outline_width" value="0.2"/> + <Option type="QString" name="outline_width_unit" value="MM"/> + <Option type="QString" name="style" value="solid"/> + </Option> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + </layer> + </symbol> + </profileFillSymbol> + <profileMarkerSymbol> + <symbol force_rhr="0" type="marker" name="" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + <layer pass="0" enabled="1" class="SimpleMarker" id="{e9c5e175-35b4-4e7e-a297-f58c3427362e}" locked="0"> + <Option type="Map"> + <Option type="QString" name="angle" value="0"/> + <Option type="QString" name="cap_style" value="square"/> + <Option type="QString" name="color" value="213,180,60,255,rgb:0.83529411764705885,0.70588235294117652,0.23529411764705882,1"/> + <Option type="QString" name="horizontal_anchor_point" value="1"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="name" value="diamond"/> + <Option type="QString" name="offset" value="0,0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="outline_color" value="152,129,43,255,rgb:0.59662775616083008,0.50420386053253985,0.1680628671702144,1"/> + <Option type="QString" name="outline_style" value="solid"/> + <Option type="QString" name="outline_width" value="0.2"/> + <Option type="QString" name="outline_width_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="outline_width_unit" value="MM"/> + <Option type="QString" name="scale_method" value="diameter"/> + <Option type="QString" name="size" value="3"/> + <Option type="QString" name="size_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="size_unit" value="MM"/> + <Option type="QString" name="vertical_anchor_point" value="1"/> + </Option> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + </layer> + </symbol> + </profileMarkerSymbol> + </elevation> + <renderer-v2 forceraster="0" referencescale="-1" enableorderby="0" type="singleSymbol" symbollevels="0"> + <symbols> + <symbol force_rhr="0" type="marker" name="0" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + <layer pass="0" enabled="1" class="SimpleMarker" id="{d4d2458c-5070-44b4-8b16-7704a2b29174}" locked="0"> + <Option type="Map"> + <Option type="QString" name="angle" value="0"/> + <Option type="QString" name="cap_style" value="square"/> + <Option type="QString" name="color" value="219,30,42,255,rgb:0.85882352941176465,0.11764705882352941,0.16470588235294117,1"/> + <Option type="QString" name="horizontal_anchor_point" value="1"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="name" value="circle"/> + <Option type="QString" name="offset" value="0,0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="outline_color" value="0,0,0,255,rgb:0,0,0,1"/> + <Option type="QString" name="outline_style" value="solid"/> + <Option type="QString" name="outline_width" value="0.4"/> + <Option type="QString" name="outline_width_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="outline_width_unit" value="MM"/> + <Option type="QString" name="scale_method" value="diameter"/> + <Option type="QString" name="size" value="4"/> + <Option type="QString" name="size_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="size_unit" value="MM"/> + <Option type="QString" name="vertical_anchor_point" value="1"/> + </Option> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + </layer> + </symbol> + </symbols> + <rotation/> + <sizescale/> + <data-defined-properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data-defined-properties> + </renderer-v2> + <selection mode="Default"> + <selectionColor invalid="1"/> + <selectionSymbol> + <symbol force_rhr="0" type="marker" name="" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + <layer pass="0" enabled="1" class="SimpleMarker" id="{11e497de-d80c-447a-90ea-4868bf8b3c9d}" locked="0"> + <Option type="Map"> + <Option type="QString" name="angle" value="0"/> + <Option type="QString" name="cap_style" value="square"/> + <Option type="QString" name="color" value="255,0,0,255,rgb:1,0,0,1"/> + <Option type="QString" name="horizontal_anchor_point" value="1"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="name" value="circle"/> + <Option type="QString" name="offset" value="0,0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="outline_color" value="35,35,35,255,rgb:0.13725490196078433,0.13725490196078433,0.13725490196078433,1"/> + <Option type="QString" name="outline_style" value="solid"/> + <Option type="QString" name="outline_width" value="0"/> + <Option type="QString" name="outline_width_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="outline_width_unit" value="MM"/> + <Option type="QString" name="scale_method" value="diameter"/> + <Option type="QString" name="size" value="2"/> + <Option type="QString" name="size_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="size_unit" value="MM"/> + <Option type="QString" name="vertical_anchor_point" value="1"/> + </Option> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + </layer> + </symbol> + </selectionSymbol> + </selection> + <customproperties> + <Option type="Map"> + <Option type="QString" name="QFieldSync/action" value="copy"/> + <Option type="QString" name="QFieldSync/attachment_naming" value="{"champ_media_finds": "'DCIM/context-records_' || format_date(now(),'yyyyMMddhhmmsszzz') || '.{extension}'"}"/> + <Option type="QString" name="QFieldSync/cloud_action" value="offline"/> + <Option type="QString" name="QFieldSync/geometry_locked_expression" value=""/> + <Option type="QString" name="QFieldSync/photo_naming" value="{"champ_media_finds": "'DCIM/context-records_' || format_date(now(),'yyyyMMddhhmmsszzz') || '.{extension}'"}"/> + <Option type="QString" name="QFieldSync/relationship_maximum_visible" value="{}"/> + <Option type="QString" name="QFieldSync/remoteLayerId" value="Support_920d875a_c96c_44bd_a775_da5094508e21"/> + <Option type="QString" name="QFieldSync/sourceDataPrimaryKeys" value="fid"/> + <Option type="int" name="QFieldSync/tracking_distance_requirement_minimum_meters" value="30"/> + <Option type="int" name="QFieldSync/tracking_erroneous_distance_safeguard_maximum_meters" value="1"/> + <Option type="int" name="QFieldSync/tracking_measurement_type" value="0"/> + <Option type="int" name="QFieldSync/tracking_time_requirement_interval_seconds" value="30"/> + <Option type="int" name="QFieldSync/value_map_button_interface_threshold" value="0"/> + <Option type="List" name="dualview/previewExpressions"> + <Option type="QString" value=""champ_id""/> + </Option> + <Option type="int" name="embeddedWidgets/count" value="0"/> + <Option name="variableNames"/> + <Option name="variableValues"/> + </Option> + </customproperties> + <blendMode>0</blendMode> + <featureBlendMode>0</featureBlendMode> + <layerOpacity>1</layerOpacity> + <geometryOptions geometryPrecision="0" removeDuplicateNodes="0"> <activeChecks/> <checkConfiguration/> </geometryOptions> - <legend showLabelLegend="0" type="default-vector"/> + <legend type="default-vector" showLabelLegend="0"/> <referencedLayers/> <fieldConfiguration> - <field name="fid" configurationFlags="NoFlag"> + <field configurationFlags="NoFlag" name="fid"> <editWidget type="TextEdit"> <config> <Option type="Map"> - <Option value="false" type="bool" name="IsMultiline"/> - <Option value="false" type="bool" name="UseHtml"/> + <Option type="bool" name="IsMultiline" value="false"/> + <Option type="bool" name="UseHtml" value="false"/> </Option> </config> </editWidget> </field> - <field name="champ_id" configurationFlags="NoFlag"> + <field configurationFlags="NoFlag" name="champ_id"> <editWidget type="TextEdit"> <config> <Option type="Map"> - <Option value="false" type="bool" name="IsMultiline"/> - <Option value="false" type="bool" name="UseHtml"/> + <Option type="bool" name="IsMultiline" value="false"/> + <Option type="bool" name="UseHtml" value="false"/> </Option> </config> </editWidget> </field> - <field name="champ_date" configurationFlags="NoFlag"> + <field configurationFlags="NoFlag" name="champ_date"> <editWidget type="DateTime"> <config> <Option type="Map"> - <Option value="true" type="bool" name="allow_null"/> - <Option value="true" type="bool" name="calendar_popup"/> - <Option value="dd/MM/yyyy" type="QString" name="display_format"/> - <Option value="yyyy-MM-dd" type="QString" name="field_format"/> - <Option value="true" type="bool" name="field_format_overwrite"/> - <Option value="false" type="bool" name="field_iso_format"/> + <Option type="bool" name="allow_null" value="true"/> + <Option type="bool" name="calendar_popup" value="true"/> + <Option type="QString" name="display_format" value="dd/MM/yyyy"/> + <Option type="QString" name="field_format" value="yyyy-MM-dd"/> + <Option type="bool" name="field_format_overwrite" value="true"/> + <Option type="bool" name="field_iso_format" value="false"/> </Option> </config> </editWidget> </field> - <field name="champ_datetime" configurationFlags="NoFlag"> + <field configurationFlags="NoFlag" name="champ_datetime"> <editWidget type="DateTime"> <config> <Option type="Map"> - <Option value="true" type="bool" name="allow_null"/> - <Option value="true" type="bool" name="calendar_popup"/> - <Option value="dd/MM/yyyy HH:mm:ss" type="QString" name="display_format"/> - <Option value="yyyy-MM-dd HH:mm:ss" type="QString" name="field_format"/> - <Option value="true" type="bool" name="field_format_overwrite"/> - <Option value="false" type="bool" name="field_iso_format"/> + <Option type="bool" name="allow_null" value="true"/> + <Option type="bool" name="calendar_popup" value="true"/> + <Option type="QString" name="display_format" value="dd/MM/yyyy HH:mm:ss"/> + <Option type="QString" name="field_format" value="yyyy-MM-dd HH:mm:ss"/> + <Option type="bool" name="field_format_overwrite" value="true"/> + <Option type="bool" name="field_iso_format" value="false"/> </Option> </config> </editWidget> </field> - <field name="champ_x" configurationFlags="NoFlag"> + <field configurationFlags="NoFlag" name="champ_x"> <editWidget type="TextEdit"> <config> <Option type="Map"> - <Option value="false" type="bool" name="IsMultiline"/> - <Option value="false" type="bool" name="UseHtml"/> + <Option type="bool" name="IsMultiline" value="false"/> + <Option type="bool" name="UseHtml" value="false"/> </Option> </config> </editWidget> </field> - <field name="champ_y" configurationFlags="NoFlag"> + <field configurationFlags="NoFlag" name="champ_y"> <editWidget type="TextEdit"> <config> <Option type="Map"> - <Option value="false" type="bool" name="IsMultiline"/> - <Option value="false" type="bool" name="UseHtml"/> + <Option type="bool" name="IsMultiline" value="false"/> + <Option type="bool" name="UseHtml" value="false"/> </Option> </config> </editWidget> </field> - <field name="champ_z" configurationFlags="NoFlag"> + <field configurationFlags="NoFlag" name="champ_z"> <editWidget type="TextEdit"> <config> <Option type="Map"> - <Option value="false" type="bool" name="IsMultiline"/> - <Option value="false" type="bool" name="UseHtml"/> + <Option type="bool" name="IsMultiline" value="false"/> + <Option type="bool" name="UseHtml" value="false"/> </Option> </config> </editWidget> </field> - <field name="champ_media" configurationFlags="NoFlag"> + <field configurationFlags="NoFlag" name="champ_media_finds"> <editWidget type="ExternalResource"> <config> <Option type="Map"> - <Option value="1" type="int" name="DocumentViewer"/> - <Option value="0" type="int" name="DocumentViewerHeight"/> - <Option value="0" type="int" name="DocumentViewerWidth"/> - <Option value="true" type="bool" name="FileWidget"/> - <Option value="true" type="bool" name="FileWidgetButton"/> + <Option type="int" name="DocumentViewer" value="1"/> + <Option type="int" name="DocumentViewerHeight" value="0"/> + <Option type="int" name="DocumentViewerWidth" value="0"/> + <Option type="bool" name="FileWidget" value="true"/> + <Option type="bool" name="FileWidgetButton" value="true"/> <Option type="invalid" name="FileWidgetFilter"/> <Option type="Map" name="PropertyCollection"> <Option type="invalid" name="name"/> <Option type="invalid" name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> - <Option value="0" type="int" name="RelativeStorage"/> + <Option type="int" name="RelativeStorage" value="0"/> <Option type="invalid" name="StorageAuthConfigId"/> - <Option value="0" type="int" name="StorageMode"/> + <Option type="int" name="StorageMode" value="0"/> <Option type="invalid" name="StorageType"/> </Option> </config> </editWidget> </field> - <field name="champ_wkt_2d" configurationFlags="NoFlag"> + <field configurationFlags="NoFlag" name="champ_wkt_simple"> <editWidget type="TextEdit"> <config> <Option type="Map"> - <Option value="false" type="bool" name="IsMultiline"/> - <Option value="false" type="bool" name="UseHtml"/> + <Option type="bool" name="IsMultiline" value="false"/> + <Option type="bool" name="UseHtml" value="false"/> </Option> </config> </editWidget> </field> - <field name="champ_wkt_3d" configurationFlags="NoFlag"> + <field configurationFlags="NoFlag" name="champ_wkt_modif"> <editWidget type="TextEdit"> <config> <Option type="Map"> - <Option value="false" type="bool" name="IsMultiline"/> - <Option value="false" type="bool" name="UseHtml"/> + <Option type="bool" name="IsMultiline" value="false"/> + <Option type="bool" name="UseHtml" value="false"/> + </Option> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="champ_ue"> + <editWidget type="TextEdit"> + <config> + <Option type="Map"> + <Option type="bool" name="IsMultiline" value="false"/> + <Option type="bool" name="UseHtml" value="false"/> </Option> </config> </editWidget> @@ -653,9 +1961,10 @@ <alias index="4" name="" field="champ_x"/> <alias index="5" name="" field="champ_y"/> <alias index="6" name="" field="champ_z"/> - <alias index="7" name="" field="champ_media"/> - <alias index="8" name="" field="champ_wkt_2d"/> - <alias index="9" name="" field="champ_wkt_3d"/> + <alias index="7" name="" field="champ_media_finds"/> + <alias index="8" name="" field="champ_wkt_simple"/> + <alias index="9" name="" field="champ_wkt_modif"/> + <alias index="10" name="" field="champ_ue"/> </aliases> <splitPolicies> <policy policy="DefaultValue" field="fid"/> @@ -665,9 +1974,10 @@ <policy policy="DefaultValue" field="champ_x"/> <policy policy="DefaultValue" field="champ_y"/> <policy policy="DefaultValue" field="champ_z"/> - <policy policy="DefaultValue" field="champ_media"/> - <policy policy="DefaultValue" field="champ_wkt_2d"/> - <policy policy="DefaultValue" field="champ_wkt_3d"/> + <policy policy="DefaultValue" field="champ_media_finds"/> + <policy policy="DefaultValue" field="champ_wkt_simple"/> + <policy policy="DefaultValue" field="champ_wkt_modif"/> + <policy policy="DefaultValue" field="champ_ue"/> </splitPolicies> <duplicatePolicies> <policy policy="Duplicate" field="fid"/> @@ -677,63 +1987,68 @@ <policy policy="Duplicate" field="champ_x"/> <policy policy="Duplicate" field="champ_y"/> <policy policy="Duplicate" field="champ_z"/> - <policy policy="Duplicate" field="champ_media"/> - <policy policy="Duplicate" field="champ_wkt_2d"/> - <policy policy="Duplicate" field="champ_wkt_3d"/> + <policy policy="Duplicate" field="champ_media_finds"/> + <policy policy="Duplicate" field="champ_wkt_simple"/> + <policy policy="Duplicate" field="champ_wkt_modif"/> + <policy policy="Duplicate" field="champ_ue"/> </duplicatePolicies> <defaults> - <default applyOnUpdate="0" field="fid" expression=""/> - <default applyOnUpdate="1" field="champ_id" expression="concat(now(),'-',CASE
WHEN maximum("fid") is NULL THEN 1
WHEN "fid" > 1 THEN maximum("fid")+1
ELSE "fid"
END)"/> - <default applyOnUpdate="0" field="champ_date" expression="now()"/> - <default applyOnUpdate="0" field="champ_datetime" expression="now()"/> - <default applyOnUpdate="1" field="champ_x" expression="x(@geometry)"/> - <default applyOnUpdate="1" field="champ_y" expression="y(@geometry)"/> - <default applyOnUpdate="1" field="champ_z" expression=" if( z(@geometry) = 0, z(@geometry), 0)"/> - <default applyOnUpdate="0" field="champ_media" expression=""/> - <default applyOnUpdate="0" field="champ_wkt_2d" expression="geom_to_wkt(@geometry)"/> - <default applyOnUpdate="1" field="champ_wkt_3d" expression="replace(geom_to_wkt(@geometry),' 0', ' '||"champ_z")"/> + <default applyOnUpdate="0" expression="" field="fid"/> + <default applyOnUpdate="1" expression="concat(now(),'-',CASE
WHEN maximum("fid") is NULL THEN 1
WHEN "fid" > 1 THEN maximum("fid")+1
ELSE "fid"
END)" field="champ_id"/> + <default applyOnUpdate="0" expression="now()" field="champ_date"/> + <default applyOnUpdate="0" expression="now()" field="champ_datetime"/> + <default applyOnUpdate="1" expression="x(@geometry)" field="champ_x"/> + <default applyOnUpdate="1" expression="y(@geometry)" field="champ_y"/> + <default applyOnUpdate="1" expression=" if( z(@geometry) != 0, z(@geometry), 0)" field="champ_z"/> + <default applyOnUpdate="0" expression="" field="champ_media_finds"/> + <default applyOnUpdate="0" expression=" geom_to_wkt(@geometry)" field="champ_wkt_simple"/> + <default applyOnUpdate="1" expression="replace(geom_to_wkt(@geometry),' 0', ' '||"champ_z")" field="champ_wkt_modif"/> + <default applyOnUpdate="1" expression="array_to_string(overlay_intersects( 'Context_records', champ_nom))" field="champ_ue"/> </defaults> <constraints> - <constraint exp_strength="0" notnull_strength="1" constraints="3" unique_strength="1" field="fid"/> - <constraint exp_strength="0" notnull_strength="0" constraints="0" unique_strength="0" field="champ_id"/> - <constraint exp_strength="0" notnull_strength="0" constraints="0" unique_strength="0" field="champ_date"/> - <constraint exp_strength="0" notnull_strength="0" constraints="0" unique_strength="0" field="champ_datetime"/> - <constraint exp_strength="0" notnull_strength="0" constraints="0" unique_strength="0" field="champ_x"/> - <constraint exp_strength="0" notnull_strength="0" constraints="0" unique_strength="0" field="champ_y"/> - <constraint exp_strength="0" notnull_strength="0" constraints="0" unique_strength="0" field="champ_z"/> - <constraint exp_strength="0" notnull_strength="0" constraints="0" unique_strength="0" field="champ_media"/> - <constraint exp_strength="0" notnull_strength="0" constraints="0" unique_strength="0" field="champ_wkt_2d"/> - <constraint exp_strength="0" notnull_strength="0" constraints="0" unique_strength="0" field="champ_wkt_3d"/> + <constraint unique_strength="1" exp_strength="0" constraints="3" notnull_strength="1" field="fid"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="champ_id"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="champ_date"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="champ_datetime"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="champ_x"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="champ_y"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="champ_z"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="champ_media_finds"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="champ_wkt_simple"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="champ_wkt_modif"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="champ_ue"/> </constraints> <constraintExpressions> - <constraint exp="" field="fid" desc=""/> - <constraint exp="" field="champ_id" desc=""/> - <constraint exp="" field="champ_date" desc=""/> - <constraint exp="" field="champ_datetime" desc=""/> - <constraint exp="" field="champ_x" desc=""/> - <constraint exp="" field="champ_y" desc=""/> - <constraint exp="" field="champ_z" desc=""/> - <constraint exp="" field="champ_media" desc=""/> - <constraint exp="" field="champ_wkt_2d" desc=""/> - <constraint exp="" field="champ_wkt_3d" desc=""/> + <constraint exp="" desc="" field="fid"/> + <constraint exp="" desc="" field="champ_id"/> + <constraint exp="" desc="" field="champ_date"/> + <constraint exp="" desc="" field="champ_datetime"/> + <constraint exp="" desc="" field="champ_x"/> + <constraint exp="" desc="" field="champ_y"/> + <constraint exp="" desc="" field="champ_z"/> + <constraint exp="" desc="" field="champ_media_finds"/> + <constraint exp="" desc="" field="champ_wkt_simple"/> + <constraint exp="" desc="" field="champ_wkt_modif"/> + <constraint exp="" desc="" field="champ_ue"/> </constraintExpressions> <expressionfields/> <attributeactions> - <defaultAction value="{00000000-0000-0000-0000-000000000000}" key="Canvas"/> + <defaultAction key="Canvas" value="{00000000-0000-0000-0000-000000000000}"/> </attributeactions> - <attributetableconfig sortOrder="0" sortExpression="" actionWidgetStyle="dropDown"> + <attributetableconfig sortOrder="0" actionWidgetStyle="dropDown" sortExpression=""> <columns> - <column width="-1" type="field" name="fid" hidden="0"/> - <column width="409" type="field" name="champ_id" hidden="0"/> - <column width="-1" type="field" name="champ_date" hidden="0"/> - <column width="-1" type="field" name="champ_datetime" hidden="0"/> - <column width="-1" type="field" name="champ_x" hidden="0"/> - <column width="-1" type="field" name="champ_y" hidden="0"/> - <column width="-1" type="field" name="champ_z" hidden="0"/> - <column width="-1" type="field" name="champ_media" hidden="0"/> - <column width="-1" type="field" name="champ_wkt_2d" hidden="0"/> - <column width="-1" type="field" name="champ_wkt_3d" hidden="0"/> - <column width="-1" type="actions" hidden="1"/> + <column type="field" name="fid" hidden="0" width="-1"/> + <column type="field" name="champ_id" hidden="0" width="409"/> + <column type="field" name="champ_ue" hidden="0" width="-1"/> + <column type="field" name="champ_date" hidden="0" width="-1"/> + <column type="field" name="champ_datetime" hidden="0" width="-1"/> + <column type="field" name="champ_x" hidden="0" width="-1"/> + <column type="field" name="champ_y" hidden="0" width="-1"/> + <column type="field" name="champ_z" hidden="0" width="-1"/> + <column type="field" name="champ_media_finds" hidden="0" width="-1"/> + <column type="field" name="champ_wkt_simple" hidden="0" width="-1"/> + <column type="field" name="champ_wkt_modif" hidden="0" width="-1"/> + <column type="actions" hidden="1" width="-1"/> </columns> </attributetableconfig> <conditionalstyles> @@ -768,47 +2083,56 @@ def my_form_open(dialog, layer, feature): <field name="champ_date" editable="1"/> <field name="champ_datetime" editable="1"/> <field name="champ_id" editable="1"/> - <field name="champ_media" editable="1"/> + <field name="champ_media_finds" editable="1"/> + <field name="champ_ue" editable="1"/> <field name="champ_wkt" editable="1"/> <field name="champ_wkt_2d" editable="1"/> <field name="champ_wkt_3d" editable="1"/> + <field name="champ_wkt_modif" editable="1"/> + <field name="champ_wkt_simple" editable="1"/> <field name="champ_x" editable="1"/> <field name="champ_y" editable="1"/> <field name="champ_z" editable="1"/> <field name="fid" editable="1"/> </editable> <labelOnTop> - <field name="champ_date" labelOnTop="0"/> - <field name="champ_datetime" labelOnTop="0"/> - <field name="champ_id" labelOnTop="0"/> - <field name="champ_media" labelOnTop="0"/> - <field name="champ_wkt" labelOnTop="0"/> - <field name="champ_wkt_2d" labelOnTop="0"/> - <field name="champ_wkt_3d" labelOnTop="0"/> - <field name="champ_x" labelOnTop="0"/> - <field name="champ_y" labelOnTop="0"/> - <field name="champ_z" labelOnTop="0"/> - <field name="fid" labelOnTop="0"/> + <field labelOnTop="0" name="champ_date"/> + <field labelOnTop="0" name="champ_datetime"/> + <field labelOnTop="0" name="champ_id"/> + <field labelOnTop="0" name="champ_media_finds"/> + <field labelOnTop="0" name="champ_ue"/> + <field labelOnTop="0" name="champ_wkt"/> + <field labelOnTop="0" name="champ_wkt_2d"/> + <field labelOnTop="0" name="champ_wkt_3d"/> + <field labelOnTop="0" name="champ_wkt_modif"/> + <field labelOnTop="0" name="champ_wkt_simple"/> + <field labelOnTop="0" name="champ_x"/> + <field labelOnTop="0" name="champ_y"/> + <field labelOnTop="0" name="champ_z"/> + <field labelOnTop="0" name="fid"/> </labelOnTop> <reuseLastValue> - <field reuseLastValue="0" name="champ_date"/> - <field reuseLastValue="0" name="champ_datetime"/> - <field reuseLastValue="1" name="champ_id"/> - <field reuseLastValue="0" name="champ_media"/> - <field reuseLastValue="0" name="champ_wkt"/> - <field reuseLastValue="0" name="champ_wkt_2d"/> - <field reuseLastValue="0" name="champ_wkt_3d"/> - <field reuseLastValue="0" name="champ_x"/> - <field reuseLastValue="0" name="champ_y"/> - <field reuseLastValue="0" name="champ_z"/> - <field reuseLastValue="0" name="fid"/> + <field name="champ_date" reuseLastValue="0"/> + <field name="champ_datetime" reuseLastValue="0"/> + <field name="champ_id" reuseLastValue="1"/> + <field name="champ_media_finds" reuseLastValue="0"/> + <field name="champ_ue" reuseLastValue="0"/> + <field name="champ_wkt" reuseLastValue="0"/> + <field name="champ_wkt_2d" reuseLastValue="0"/> + <field name="champ_wkt_3d" reuseLastValue="0"/> + <field name="champ_wkt_modif" reuseLastValue="0"/> + <field name="champ_wkt_simple" reuseLastValue="0"/> + <field name="champ_x" reuseLastValue="0"/> + <field name="champ_y" reuseLastValue="0"/> + <field name="champ_z" reuseLastValue="0"/> + <field name="fid" reuseLastValue="0"/> </reuseLastValue> <dataDefinedFieldProperties/> <widgets/> <previewExpression>"champ_id"</previewExpression> <mapTip enabled="1"></mapTip> </maplayer> - <maplayer legendPlaceholderImage="" autoRefreshMode="Disabled" maxScale="0" minScale="1e+08" type="raster" autoRefreshTime="0" refreshOnNotifyMessage="" refreshOnNotifyEnabled="0" styleCategories="AllStyleCategories" hasScaleBasedVisibilityFlag="0"> + <maplayer minScale="1e+08" refreshOnNotifyMessage="" styleCategories="AllStyleCategories" hasScaleBasedVisibilityFlag="0" maxScale="0" type="raster" refreshOnNotifyEnabled="0" legendPlaceholderImage="" autoRefreshTime="0" autoRefreshMode="Disabled"> <extent> <xmin>-20037508.34278924390673637</xmin> <ymin>-20037508.34278924763202667</ymin> @@ -849,7 +2173,7 @@ def my_form_open(dialog, layer, feature): <title>Tuiles OpenStreetMap</title> <abstract>OpenStreetMap est construit par une communauté de cartographes qui contribuent et maintiennent des données sur les routes, les sentiers, les cafés, les gares, et bien plus encore, dans le monde entier.</abstract> <links> - <link format="" mimeType="" name="Source" type="WWW:LINK" url="https://www.openstreetmap.org/" description="" size=""/> + <link description="" format="" size="" type="WWW:LINK" name="Source" mimeType="" url="https://www.openstreetmap.org/"/> </links> <dates/> <fees></fees> @@ -871,12 +2195,12 @@ def my_form_open(dialog, layer, feature): </spatialrefsys> </crs> <extent> - <spatial dimensions="2" maxx="180" minx="-180" crs="EPSG:4326" maxy="85.05112877980660357" miny="-85.05112877980660357" maxz="nan" minz="nan"/> + <spatial maxx="180" maxz="nan" dimensions="2" miny="-85.05112877980660357" crs="EPSG:4326" minx="-180" minz="nan" maxy="85.05112877980660357"/> </extent> </resourceMetadata> <provider>wms</provider> <noData> - <noDataList bandNo="1" useSrcNoData="0"/> + <noDataList useSrcNoData="0" bandNo="1"/> </noData> <map-layer-style-manager current="défaut"> <map-layer-style name="défaut"/> @@ -888,97 +2212,97 @@ def my_form_open(dialog, layer, feature): <Searchable>0</Searchable> <Private>0</Private> </flags> - <temporal fetchMode="0" bandNumber="1" enabled="0" mode="0"> + <temporal mode="0" enabled="0" fetchMode="0" bandNumber="1"> <fixedRange> <start></start> <end></end> </fixedRange> </temporal> - <elevation enabled="0" band="1" mode="RepresentsElevationSurface" symbology="Line" zscale="1" zoffset="0"> + <elevation mode="RepresentsElevationSurface" symbology="Line" zoffset="0" enabled="0" zscale="1" band="1"> <data-defined-properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </data-defined-properties> <profileLineSymbol> - <symbol force_rhr="0" clip_to_extent="1" alpha="1" type="line" name="" is_animated="0" frame_rate="10"> + <symbol force_rhr="0" type="line" name="" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> <data_defined_properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </data_defined_properties> - <layer locked="0" pass="0" class="SimpleLine" enabled="1" id="{12c4ea8e-af4f-47ab-9aa9-58d863f5a27c}"> - <Option type="Map"> - <Option value="0" type="QString" name="align_dash_pattern"/> - <Option value="square" type="QString" name="capstyle"/> - <Option value="5;2" type="QString" name="customdash"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="customdash_map_unit_scale"/> - <Option value="MM" type="QString" name="customdash_unit"/> - <Option value="0" type="QString" name="dash_pattern_offset"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="dash_pattern_offset_map_unit_scale"/> - <Option value="MM" type="QString" name="dash_pattern_offset_unit"/> - <Option value="0" type="QString" name="draw_inside_polygon"/> - <Option value="bevel" type="QString" name="joinstyle"/> - <Option value="125,139,143,255,rgb:0.49019607843137253,0.54509803921568623,0.5607843137254902,1" type="QString" name="line_color"/> - <Option value="solid" type="QString" name="line_style"/> - <Option value="0.6" type="QString" name="line_width"/> - <Option value="MM" type="QString" name="line_width_unit"/> - <Option value="0" type="QString" name="offset"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="offset_map_unit_scale"/> - <Option value="MM" type="QString" name="offset_unit"/> - <Option value="0" type="QString" name="ring_filter"/> - <Option value="0" type="QString" name="trim_distance_end"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="trim_distance_end_map_unit_scale"/> - <Option value="MM" type="QString" name="trim_distance_end_unit"/> - <Option value="0" type="QString" name="trim_distance_start"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="trim_distance_start_map_unit_scale"/> - <Option value="MM" type="QString" name="trim_distance_start_unit"/> - <Option value="0" type="QString" name="tweak_dash_pattern_on_corners"/> - <Option value="0" type="QString" name="use_custom_dash"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="width_map_unit_scale"/> + <layer pass="0" enabled="1" class="SimpleLine" id="{12c4ea8e-af4f-47ab-9aa9-58d863f5a27c}" locked="0"> + <Option type="Map"> + <Option type="QString" name="align_dash_pattern" value="0"/> + <Option type="QString" name="capstyle" value="square"/> + <Option type="QString" name="customdash" value="5;2"/> + <Option type="QString" name="customdash_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="customdash_unit" value="MM"/> + <Option type="QString" name="dash_pattern_offset" value="0"/> + <Option type="QString" name="dash_pattern_offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="dash_pattern_offset_unit" value="MM"/> + <Option type="QString" name="draw_inside_polygon" value="0"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="line_color" value="125,139,143,255,rgb:0.49019607843137253,0.54509803921568623,0.5607843137254902,1"/> + <Option type="QString" name="line_style" value="solid"/> + <Option type="QString" name="line_width" value="0.6"/> + <Option type="QString" name="line_width_unit" value="MM"/> + <Option type="QString" name="offset" value="0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="ring_filter" value="0"/> + <Option type="QString" name="trim_distance_end" value="0"/> + <Option type="QString" name="trim_distance_end_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="trim_distance_end_unit" value="MM"/> + <Option type="QString" name="trim_distance_start" value="0"/> + <Option type="QString" name="trim_distance_start_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="trim_distance_start_unit" value="MM"/> + <Option type="QString" name="tweak_dash_pattern_on_corners" value="0"/> + <Option type="QString" name="use_custom_dash" value="0"/> + <Option type="QString" name="width_map_unit_scale" value="3x:0,0,0,0,0,0"/> </Option> <data_defined_properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </data_defined_properties> </layer> </symbol> </profileLineSymbol> <profileFillSymbol> - <symbol force_rhr="0" clip_to_extent="1" alpha="1" type="fill" name="" is_animated="0" frame_rate="10"> + <symbol force_rhr="0" type="fill" name="" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> <data_defined_properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </data_defined_properties> - <layer locked="0" pass="0" class="SimpleFill" enabled="1" id="{3347962e-73d6-4857-bee9-bb9c3f9d99f8}"> - <Option type="Map"> - <Option value="3x:0,0,0,0,0,0" type="QString" name="border_width_map_unit_scale"/> - <Option value="125,139,143,255,rgb:0.49019607843137253,0.54509803921568623,0.5607843137254902,1" type="QString" name="color"/> - <Option value="bevel" type="QString" name="joinstyle"/> - <Option value="0,0" type="QString" name="offset"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="offset_map_unit_scale"/> - <Option value="MM" type="QString" name="offset_unit"/> - <Option value="35,35,35,255,rgb:0.13725490196078433,0.13725490196078433,0.13725490196078433,1" type="QString" name="outline_color"/> - <Option value="no" type="QString" name="outline_style"/> - <Option value="0.26" type="QString" name="outline_width"/> - <Option value="MM" type="QString" name="outline_width_unit"/> - <Option value="solid" type="QString" name="style"/> + <layer pass="0" enabled="1" class="SimpleFill" id="{3347962e-73d6-4857-bee9-bb9c3f9d99f8}" locked="0"> + <Option type="Map"> + <Option type="QString" name="border_width_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="color" value="125,139,143,255,rgb:0.49019607843137253,0.54509803921568623,0.5607843137254902,1"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="offset" value="0,0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="outline_color" value="35,35,35,255,rgb:0.13725490196078433,0.13725490196078433,0.13725490196078433,1"/> + <Option type="QString" name="outline_style" value="no"/> + <Option type="QString" name="outline_width" value="0.26"/> + <Option type="QString" name="outline_width_unit" value="MM"/> + <Option type="QString" name="style" value="solid"/> </Option> <data_defined_properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </data_defined_properties> </layer> @@ -987,34 +2311,34 @@ def my_form_open(dialog, layer, feature): </elevation> <customproperties> <Option type="Map"> - <Option value="no_action" type="QString" name="QFieldSync/action"/> - <Option value="{}" type="QString" name="QFieldSync/attachment_naming"/> - <Option value="no_action" type="QString" name="QFieldSync/cloud_action"/> + <Option type="QString" name="QFieldSync/action" value="no_action"/> + <Option type="QString" name="QFieldSync/attachment_naming" value="{}"/> + <Option type="QString" name="QFieldSync/cloud_action" value="no_action"/> <Option type="invalid" name="QFieldSync/geometry_locked_expression"/> - <Option value="{}" type="QString" name="QFieldSync/photo_naming"/> - <Option value="{}" type="QString" name="QFieldSync/relationship_maximum_visible"/> - <Option value="OSM_Standard_88a32e94_cd29_412c_8b66_ee44fe338fab" type="QString" name="QFieldSync/remoteLayerId"/> - <Option value="30" type="int" name="QFieldSync/tracking_distance_requirement_minimum_meters"/> - <Option value="false" type="bool" name="QFieldSync/tracking_erroneous_distance_safeguard_maximum_meters"/> - <Option value="0" type="int" name="QFieldSync/tracking_measurement_type"/> - <Option value="30" type="int" name="QFieldSync/tracking_time_requirement_interval_seconds"/> - <Option value="0" type="int" name="QFieldSync/value_map_button_interface_threshold"/> - <Option value="Undefined" type="QString" name="identify/format"/> + <Option type="QString" name="QFieldSync/photo_naming" value="{}"/> + <Option type="QString" name="QFieldSync/relationship_maximum_visible" value="{}"/> + <Option type="QString" name="QFieldSync/remoteLayerId" value="OSM_Standard_88a32e94_cd29_412c_8b66_ee44fe338fab"/> + <Option type="int" name="QFieldSync/tracking_distance_requirement_minimum_meters" value="30"/> + <Option type="bool" name="QFieldSync/tracking_erroneous_distance_safeguard_maximum_meters" value="false"/> + <Option type="int" name="QFieldSync/tracking_measurement_type" value="0"/> + <Option type="int" name="QFieldSync/tracking_time_requirement_interval_seconds" value="30"/> + <Option type="int" name="QFieldSync/value_map_button_interface_threshold" value="0"/> + <Option type="QString" name="identify/format" value="Undefined"/> </Option> </customproperties> <mapTip enabled="1"></mapTip> <pipe-data-defined-properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </pipe-data-defined-properties> <pipe> <provider> - <resampling zoomedInResamplingMethod="nearestNeighbour" zoomedOutResamplingMethod="nearestNeighbour" enabled="false" maxOversampling="2"/> + <resampling zoomedOutResamplingMethod="nearestNeighbour" enabled="false" zoomedInResamplingMethod="nearestNeighbour" maxOversampling="2"/> </provider> - <rasterrenderer opacity="1" alphaBand="-1" nodataColor="" type="singlebandcolordata" band="1"> + <rasterrenderer opacity="1" type="singlebandcolordata" alphaBand="-1" nodataColor="" band="1"> <rasterTransparency/> <minMaxOrigin> <limits>None</limits> @@ -1025,14 +2349,14 @@ def my_form_open(dialog, layer, feature): <stdDevFactor>2</stdDevFactor> </minMaxOrigin> </rasterrenderer> - <brightnesscontrast brightness="0" contrast="0" gamma="1"/> - <huesaturation colorizeGreen="128" grayscaleMode="0" colorizeBlue="128" invertColors="0" colorizeOn="0" saturation="0" colorizeRed="255" colorizeStrength="100"/> + <brightnesscontrast gamma="1" contrast="0" brightness="0"/> + <huesaturation invertColors="0" colorizeGreen="128" colorizeBlue="128" colorizeStrength="100" colorizeOn="0" colorizeRed="255" saturation="0" grayscaleMode="0"/> <rasterresampler maxOversampling="2"/> <resamplingStage>resamplingFilter</resamplingStage> </pipe> <blendMode>0</blendMode> </maplayer> - <maplayer legendPlaceholderImage="" autoRefreshMode="Disabled" maxScale="0" minScale="1e+08" type="raster" autoRefreshTime="0" refreshOnNotifyMessage="" refreshOnNotifyEnabled="0" styleCategories="AllStyleCategories" hasScaleBasedVisibilityFlag="0"> + <maplayer minScale="1e+08" refreshOnNotifyMessage="" styleCategories="AllStyleCategories" hasScaleBasedVisibilityFlag="0" maxScale="0" type="raster" refreshOnNotifyEnabled="0" legendPlaceholderImage="" autoRefreshTime="0" autoRefreshMode="Disabled"> <extent> <xmin>-20037508.34278924390673637</xmin> <ymin>-15538711.09630922041833401</ymin> @@ -1092,7 +2416,7 @@ def my_form_open(dialog, layer, feature): </resourceMetadata> <provider>wms</provider> <noData> - <noDataList bandNo="1" useSrcNoData="0"/> + <noDataList useSrcNoData="0" bandNo="1"/> </noData> <map-layer-style-manager current="défaut"> <map-layer-style name="défaut"/> @@ -1104,97 +2428,97 @@ def my_form_open(dialog, layer, feature): <Searchable>1</Searchable> <Private>0</Private> </flags> - <temporal fetchMode="0" bandNumber="1" enabled="0" mode="0"> + <temporal mode="0" enabled="0" fetchMode="0" bandNumber="1"> <fixedRange> <start></start> <end></end> </fixedRange> </temporal> - <elevation enabled="0" band="1" mode="RepresentsElevationSurface" symbology="Line" zscale="1" zoffset="0"> + <elevation mode="RepresentsElevationSurface" symbology="Line" zoffset="0" enabled="0" zscale="1" band="1"> <data-defined-properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </data-defined-properties> <profileLineSymbol> - <symbol force_rhr="0" clip_to_extent="1" alpha="1" type="line" name="" is_animated="0" frame_rate="10"> + <symbol force_rhr="0" type="line" name="" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> <data_defined_properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </data_defined_properties> - <layer locked="0" pass="0" class="SimpleLine" enabled="1" id="{0fe4e027-8b1d-488b-b613-919bf0e4043c}"> - <Option type="Map"> - <Option value="0" type="QString" name="align_dash_pattern"/> - <Option value="square" type="QString" name="capstyle"/> - <Option value="5;2" type="QString" name="customdash"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="customdash_map_unit_scale"/> - <Option value="MM" type="QString" name="customdash_unit"/> - <Option value="0" type="QString" name="dash_pattern_offset"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="dash_pattern_offset_map_unit_scale"/> - <Option value="MM" type="QString" name="dash_pattern_offset_unit"/> - <Option value="0" type="QString" name="draw_inside_polygon"/> - <Option value="bevel" type="QString" name="joinstyle"/> - <Option value="145,82,45,255,rgb:0.56862745098039214,0.32156862745098042,0.17647058823529413,1" type="QString" name="line_color"/> - <Option value="solid" type="QString" name="line_style"/> - <Option value="0.6" type="QString" name="line_width"/> - <Option value="MM" type="QString" name="line_width_unit"/> - <Option value="0" type="QString" name="offset"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="offset_map_unit_scale"/> - <Option value="MM" type="QString" name="offset_unit"/> - <Option value="0" type="QString" name="ring_filter"/> - <Option value="0" type="QString" name="trim_distance_end"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="trim_distance_end_map_unit_scale"/> - <Option value="MM" type="QString" name="trim_distance_end_unit"/> - <Option value="0" type="QString" name="trim_distance_start"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="trim_distance_start_map_unit_scale"/> - <Option value="MM" type="QString" name="trim_distance_start_unit"/> - <Option value="0" type="QString" name="tweak_dash_pattern_on_corners"/> - <Option value="0" type="QString" name="use_custom_dash"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="width_map_unit_scale"/> + <layer pass="0" enabled="1" class="SimpleLine" id="{0fe4e027-8b1d-488b-b613-919bf0e4043c}" locked="0"> + <Option type="Map"> + <Option type="QString" name="align_dash_pattern" value="0"/> + <Option type="QString" name="capstyle" value="square"/> + <Option type="QString" name="customdash" value="5;2"/> + <Option type="QString" name="customdash_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="customdash_unit" value="MM"/> + <Option type="QString" name="dash_pattern_offset" value="0"/> + <Option type="QString" name="dash_pattern_offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="dash_pattern_offset_unit" value="MM"/> + <Option type="QString" name="draw_inside_polygon" value="0"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="line_color" value="145,82,45,255,rgb:0.56862745098039214,0.32156862745098042,0.17647058823529413,1"/> + <Option type="QString" name="line_style" value="solid"/> + <Option type="QString" name="line_width" value="0.6"/> + <Option type="QString" name="line_width_unit" value="MM"/> + <Option type="QString" name="offset" value="0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="ring_filter" value="0"/> + <Option type="QString" name="trim_distance_end" value="0"/> + <Option type="QString" name="trim_distance_end_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="trim_distance_end_unit" value="MM"/> + <Option type="QString" name="trim_distance_start" value="0"/> + <Option type="QString" name="trim_distance_start_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="trim_distance_start_unit" value="MM"/> + <Option type="QString" name="tweak_dash_pattern_on_corners" value="0"/> + <Option type="QString" name="use_custom_dash" value="0"/> + <Option type="QString" name="width_map_unit_scale" value="3x:0,0,0,0,0,0"/> </Option> <data_defined_properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </data_defined_properties> </layer> </symbol> </profileLineSymbol> <profileFillSymbol> - <symbol force_rhr="0" clip_to_extent="1" alpha="1" type="fill" name="" is_animated="0" frame_rate="10"> + <symbol force_rhr="0" type="fill" name="" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> <data_defined_properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </data_defined_properties> - <layer locked="0" pass="0" class="SimpleFill" enabled="1" id="{0b36c597-d1e6-4109-9408-50bf7acc0149}"> - <Option type="Map"> - <Option value="3x:0,0,0,0,0,0" type="QString" name="border_width_map_unit_scale"/> - <Option value="145,82,45,255,rgb:0.56862745098039214,0.32156862745098042,0.17647058823529413,1" type="QString" name="color"/> - <Option value="bevel" type="QString" name="joinstyle"/> - <Option value="0,0" type="QString" name="offset"/> - <Option value="3x:0,0,0,0,0,0" type="QString" name="offset_map_unit_scale"/> - <Option value="MM" type="QString" name="offset_unit"/> - <Option value="35,35,35,255,rgb:0.13725490196078433,0.13725490196078433,0.13725490196078433,1" type="QString" name="outline_color"/> - <Option value="no" type="QString" name="outline_style"/> - <Option value="0.26" type="QString" name="outline_width"/> - <Option value="MM" type="QString" name="outline_width_unit"/> - <Option value="solid" type="QString" name="style"/> + <layer pass="0" enabled="1" class="SimpleFill" id="{0b36c597-d1e6-4109-9408-50bf7acc0149}" locked="0"> + <Option type="Map"> + <Option type="QString" name="border_width_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="color" value="145,82,45,255,rgb:0.56862745098039214,0.32156862745098042,0.17647058823529413,1"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="offset" value="0,0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="outline_color" value="35,35,35,255,rgb:0.13725490196078433,0.13725490196078433,0.13725490196078433,1"/> + <Option type="QString" name="outline_style" value="no"/> + <Option type="QString" name="outline_width" value="0.26"/> + <Option type="QString" name="outline_width_unit" value="MM"/> + <Option type="QString" name="style" value="solid"/> </Option> <data_defined_properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </data_defined_properties> </layer> @@ -1203,23 +2527,23 @@ def my_form_open(dialog, layer, feature): </elevation> <customproperties> <Option type="Map"> - <Option value="Ortho_20_cm_f8497a68_e819_4170_a2ce_17cc699ac2d2" type="QString" name="QFieldSync/remoteLayerId"/> - <Option value="Html" type="QString" name="identify/format"/> + <Option type="QString" name="QFieldSync/remoteLayerId" value="Ortho_20_cm_f8497a68_e819_4170_a2ce_17cc699ac2d2"/> + <Option type="QString" name="identify/format" value="Html"/> </Option> </customproperties> <mapTip enabled="1"></mapTip> <pipe-data-defined-properties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </pipe-data-defined-properties> <pipe> <provider> - <resampling zoomedInResamplingMethod="nearestNeighbour" zoomedOutResamplingMethod="nearestNeighbour" enabled="false" maxOversampling="2"/> + <resampling zoomedOutResamplingMethod="nearestNeighbour" enabled="false" zoomedInResamplingMethod="nearestNeighbour" maxOversampling="2"/> </provider> - <rasterrenderer opacity="1" alphaBand="-1" nodataColor="" type="singlebandcolordata" band="1"> + <rasterrenderer opacity="1" type="singlebandcolordata" alphaBand="-1" nodataColor="" band="1"> <rasterTransparency/> <minMaxOrigin> <limits>None</limits> @@ -1230,18 +2554,548 @@ def my_form_open(dialog, layer, feature): <stdDevFactor>2</stdDevFactor> </minMaxOrigin> </rasterrenderer> - <brightnesscontrast brightness="0" contrast="0" gamma="1"/> - <huesaturation colorizeGreen="128" grayscaleMode="0" colorizeBlue="128" invertColors="0" colorizeOn="0" saturation="0" colorizeRed="255" colorizeStrength="100"/> + <brightnesscontrast gamma="1" contrast="0" brightness="0"/> + <huesaturation invertColors="0" colorizeGreen="128" colorizeBlue="128" colorizeStrength="100" colorizeOn="0" colorizeRed="255" saturation="0" grayscaleMode="0"/> <rasterresampler maxOversampling="2"/> <resamplingStage>resamplingFilter</resamplingStage> </pipe> <blendMode>0</blendMode> </maplayer> + <maplayer minScale="100000000" maxScale="0" simplifyMaxScale="1" simplifyDrawingTol="1" simplifyAlgorithm="0" geometry="Polygon" refreshOnNotifyEnabled="0" refreshOnNotifyMessage="" wkbType="MultiPolygon" autoRefreshMode="Disabled" styleCategories="AllStyleCategories" autoRefreshTime="0" simplifyLocal="1" symbologyReferenceScale="-1" labelsEnabled="0" readOnly="0" type="vector" legendPlaceholderImage="" simplifyDrawingHints="1" hasScaleBasedVisibilityFlag="0"> + <id>Parcelles_b677c8a6_df4d_4e0a_9f9f_42287fd8263e</id> + <datasource> pagingEnabled='default' preferCoordinatesForWfsT11='false' restrictToRequestBBOX='1' srsname='EPSG:4326' typename='BDPARCELLAIRE-VECTEUR_WLD_BDD_WGS84G:parcelle' url='https://data.geopf.fr/wfs/ows' url='https://data.geopf.fr/wfs/ows?VERSION=2.0.0' version='auto'</datasource> + <keywordList> + <value></value> + </keywordList> + <layername>Parcelles</layername> + <srs> + <spatialrefsys nativeFormat="Wkt"> + <wkt>GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]]</wkt> + <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4> + <srsid>3452</srsid> + <srid>4326</srid> + <authid>EPSG:4326</authid> + <description>WGS 84</description> + <projectionacronym>longlat</projectionacronym> + <ellipsoidacronym>EPSG:7030</ellipsoidacronym> + <geographicflag>true</geographicflag> + </spatialrefsys> + </srs> + <resourceMetadata> + <identifier></identifier> + <parentidentifier></parentidentifier> + <language></language> + <type></type> + <title></title> + <abstract></abstract> + <links/> + <dates/> + <fees></fees> + <encoding></encoding> + <crs> + <spatialrefsys nativeFormat="Wkt"> + <wkt></wkt> + <proj4></proj4> + <srsid>0</srsid> + <srid>0</srid> + <authid></authid> + <description></description> + <projectionacronym></projectionacronym> + <ellipsoidacronym></ellipsoidacronym> + <geographicflag>false</geographicflag> + </spatialrefsys> + </crs> + <extent/> + </resourceMetadata> + <provider encoding="">WFS</provider> + <vectorjoins/> + <layerDependencies/> + <dataDependencies/> + <expressionfields/> + <map-layer-style-manager current="défaut"> + <map-layer-style name="défaut"/> + </map-layer-style-manager> + <auxiliaryLayer/> + <metadataUrls/> + <flags> + <Identifiable>1</Identifiable> + <Removable>1</Removable> + <Searchable>1</Searchable> + <Private>0</Private> + </flags> + <temporal endExpression="" accumulate="0" mode="0" endField="" enabled="0" durationField="population" startExpression="" limitMode="0" fixedDuration="0" durationUnit="min" startField=""> + <fixedRange> + <start></start> + <end></end> + </fixedRange> + </temporal> + <elevation extrusionEnabled="0" extrusion="0" zoffset="0" symbology="Line" zscale="1" clamping="Terrain" type="IndividualFeatures" respectLayerSymbol="1" binding="Centroid" showMarkerSymbolInSurfacePlots="0"> + <data-defined-properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data-defined-properties> + <profileLineSymbol> + <symbol force_rhr="0" type="line" name="" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + <layer pass="0" enabled="1" class="SimpleLine" id="{2cccb3e2-5136-4ae5-91ea-975a7f4a7548}" locked="0"> + <Option type="Map"> + <Option type="QString" name="align_dash_pattern" value="0"/> + <Option type="QString" name="capstyle" value="square"/> + <Option type="QString" name="customdash" value="5;2"/> + <Option type="QString" name="customdash_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="customdash_unit" value="MM"/> + <Option type="QString" name="dash_pattern_offset" value="0"/> + <Option type="QString" name="dash_pattern_offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="dash_pattern_offset_unit" value="MM"/> + <Option type="QString" name="draw_inside_polygon" value="0"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="line_color" value="164,113,88,255,rgb:0.64313725490196083,0.44313725490196076,0.34509803921568627,1"/> + <Option type="QString" name="line_style" value="solid"/> + <Option type="QString" name="line_width" value="0.6"/> + <Option type="QString" name="line_width_unit" value="MM"/> + <Option type="QString" name="offset" value="0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="ring_filter" value="0"/> + <Option type="QString" name="trim_distance_end" value="0"/> + <Option type="QString" name="trim_distance_end_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="trim_distance_end_unit" value="MM"/> + <Option type="QString" name="trim_distance_start" value="0"/> + <Option type="QString" name="trim_distance_start_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="trim_distance_start_unit" value="MM"/> + <Option type="QString" name="tweak_dash_pattern_on_corners" value="0"/> + <Option type="QString" name="use_custom_dash" value="0"/> + <Option type="QString" name="width_map_unit_scale" value="3x:0,0,0,0,0,0"/> + </Option> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + </layer> + </symbol> + </profileLineSymbol> + <profileFillSymbol> + <symbol force_rhr="0" type="fill" name="" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + <layer pass="0" enabled="1" class="SimpleFill" id="{77a2f273-86f1-4e78-9600-9079ab6a5ecb}" locked="0"> + <Option type="Map"> + <Option type="QString" name="border_width_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="color" value="164,113,88,255,rgb:0.64313725490196083,0.44313725490196076,0.34509803921568627,1"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="offset" value="0,0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="outline_color" value="117,81,63,255,rgb:0.45937285420004575,0.31653315022507056,0.24649423971923401,1"/> + <Option type="QString" name="outline_style" value="solid"/> + <Option type="QString" name="outline_width" value="0.2"/> + <Option type="QString" name="outline_width_unit" value="MM"/> + <Option type="QString" name="style" value="solid"/> + </Option> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + </layer> + </symbol> + </profileFillSymbol> + <profileMarkerSymbol> + <symbol force_rhr="0" type="marker" name="" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + <layer pass="0" enabled="1" class="SimpleMarker" id="{f4950358-1845-46d7-9946-ae9ae5c46263}" locked="0"> + <Option type="Map"> + <Option type="QString" name="angle" value="0"/> + <Option type="QString" name="cap_style" value="square"/> + <Option type="QString" name="color" value="164,113,88,255,rgb:0.64313725490196083,0.44313725490196076,0.34509803921568627,1"/> + <Option type="QString" name="horizontal_anchor_point" value="1"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="name" value="diamond"/> + <Option type="QString" name="offset" value="0,0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="outline_color" value="117,81,63,255,rgb:0.45937285420004575,0.31653315022507056,0.24649423971923401,1"/> + <Option type="QString" name="outline_style" value="solid"/> + <Option type="QString" name="outline_width" value="0.2"/> + <Option type="QString" name="outline_width_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="outline_width_unit" value="MM"/> + <Option type="QString" name="scale_method" value="diameter"/> + <Option type="QString" name="size" value="3"/> + <Option type="QString" name="size_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="size_unit" value="MM"/> + <Option type="QString" name="vertical_anchor_point" value="1"/> + </Option> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + </layer> + </symbol> + </profileMarkerSymbol> + </elevation> + <renderer-v2 forceraster="0" referencescale="-1" enableorderby="0" type="singleSymbol" symbollevels="0"> + <symbols> + <symbol force_rhr="0" type="fill" name="0" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + <layer pass="0" enabled="1" class="SimpleFill" id="{abe5e89a-5a3b-4401-8d8f-6cd38279c19b}" locked="0"> + <Option type="Map"> + <Option type="QString" name="border_width_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="color" value="133,182,111,255,rgb:0.52156862745098043,0.71372549019607845,0.43529411764705883,1"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="offset" value="0,0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="outline_color" value="35,35,35,255,rgb:0.13725490196078433,0.13725490196078433,0.13725490196078433,1"/> + <Option type="QString" name="outline_style" value="solid"/> + <Option type="QString" name="outline_width" value="0.5"/> + <Option type="QString" name="outline_width_unit" value="MM"/> + <Option type="QString" name="style" value="no"/> + </Option> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + </layer> + </symbol> + </symbols> + <rotation/> + <sizescale/> + <data-defined-properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data-defined-properties> + </renderer-v2> + <selection mode="Default"> + <selectionColor invalid="1"/> + <selectionSymbol> + <symbol force_rhr="0" type="fill" name="" alpha="1" frame_rate="10" is_animated="0" clip_to_extent="1"> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + <layer pass="0" enabled="1" class="SimpleFill" id="{4e6c353d-a5c8-4349-b244-f0ac89f8255a}" locked="0"> + <Option type="Map"> + <Option type="QString" name="border_width_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="color" value="0,0,255,255,rgb:0,0,1,1"/> + <Option type="QString" name="joinstyle" value="bevel"/> + <Option type="QString" name="offset" value="0,0"/> + <Option type="QString" name="offset_map_unit_scale" value="3x:0,0,0,0,0,0"/> + <Option type="QString" name="offset_unit" value="MM"/> + <Option type="QString" name="outline_color" value="35,35,35,255,rgb:0.13725490196078433,0.13725490196078433,0.13725490196078433,1"/> + <Option type="QString" name="outline_style" value="solid"/> + <Option type="QString" name="outline_width" value="0.26"/> + <Option type="QString" name="outline_width_unit" value="MM"/> + <Option type="QString" name="style" value="solid"/> + </Option> + <data_defined_properties> + <Option type="Map"> + <Option type="QString" name="name" value=""/> + <Option name="properties"/> + <Option type="QString" name="type" value="collection"/> + </Option> + </data_defined_properties> + </layer> + </symbol> + </selectionSymbol> + </selection> + <customproperties> + <Option type="Map"> + <Option type="QString" name="QFieldSync/action" value="no_action"/> + <Option type="QString" name="QFieldSync/attachment_naming" value="{}"/> + <Option type="QString" name="QFieldSync/cloud_action" value="offline"/> + <Option type="invalid" name="QFieldSync/geometry_locked_expression"/> + <Option type="QString" name="QFieldSync/photo_naming" value="{}"/> + <Option type="QString" name="QFieldSync/relationship_maximum_visible" value="{}"/> + <Option type="QString" name="QFieldSync/remoteLayerId" value="BDPARCELLAIRE_VECTEUR_WLD_BDD_WGS84G_parcelle_4fc600b5_b730_417c_81c3_52e182085820"/> + <Option type="int" name="QFieldSync/tracking_distance_requirement_minimum_meters" value="30"/> + <Option type="int" name="QFieldSync/tracking_erroneous_distance_safeguard_maximum_meters" value="1"/> + <Option type="int" name="QFieldSync/tracking_measurement_type" value="0"/> + <Option type="int" name="QFieldSync/tracking_time_requirement_interval_seconds" value="30"/> + <Option type="int" name="QFieldSync/value_map_button_interface_threshold" value="0"/> + <Option type="List" name="dualview/previewExpressions"> + <Option type="QString" value=""nom""/> + </Option> + <Option type="int" name="embeddedWidgets/count" value="0"/> + <Option type="invalid" name="variableNames"/> + <Option type="invalid" name="variableValues"/> + </Option> + </customproperties> + <blendMode>0</blendMode> + <featureBlendMode>0</featureBlendMode> + <layerOpacity>1</layerOpacity> + <geometryOptions geometryPrecision="0" removeDuplicateNodes="0"> + <activeChecks/> + <checkConfiguration type="Map"> + <Option type="Map" name="QgsGeometryGapCheck"> + <Option type="double" name="allowedGapsBuffer" value="0"/> + <Option type="bool" name="allowedGapsEnabled" value="false"/> + <Option type="invalid" name="allowedGapsLayer"/> + </Option> + </checkConfiguration> + </geometryOptions> + <legend type="default-vector" showLabelLegend="0"/> + <referencedLayers/> + <fieldConfiguration> + <field configurationFlags="NoFlag" name="numero"> + <editWidget type=""> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="feuille"> + <editWidget type=""> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="section"> + <editWidget type=""> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="code_dep"> + <editWidget type=""> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="nom_com"> + <editWidget type=""> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="code_com"> + <editWidget type=""> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="com_abs"> + <editWidget type=""> + <config> + <Option/> + </config> + </editWidget> + </field> + <field configurationFlags="NoFlag" name="code_arr"> + <editWidget type=""> + <config> + <Option/> + </config> + </editWidget> + </field> + </fieldConfiguration> + <aliases> + <alias index="0" name="" field="numero"/> + <alias index="1" name="" field="feuille"/> + <alias index="2" name="" field="section"/> + <alias index="3" name="" field="code_dep"/> + <alias index="4" name="" field="nom_com"/> + <alias index="5" name="" field="code_com"/> + <alias index="6" name="" field="com_abs"/> + <alias index="7" name="" field="code_arr"/> + </aliases> + <splitPolicies> + <policy policy="Duplicate" field="numero"/> + <policy policy="Duplicate" field="feuille"/> + <policy policy="Duplicate" field="section"/> + <policy policy="Duplicate" field="code_dep"/> + <policy policy="Duplicate" field="nom_com"/> + <policy policy="Duplicate" field="code_com"/> + <policy policy="Duplicate" field="com_abs"/> + <policy policy="Duplicate" field="code_arr"/> + </splitPolicies> + <duplicatePolicies> + <policy policy="Duplicate" field="numero"/> + <policy policy="Duplicate" field="feuille"/> + <policy policy="Duplicate" field="section"/> + <policy policy="Duplicate" field="code_dep"/> + <policy policy="Duplicate" field="nom_com"/> + <policy policy="Duplicate" field="code_com"/> + <policy policy="Duplicate" field="com_abs"/> + <policy policy="Duplicate" field="code_arr"/> + </duplicatePolicies> + <defaults> + <default applyOnUpdate="0" expression="" field="numero"/> + <default applyOnUpdate="0" expression="" field="feuille"/> + <default applyOnUpdate="0" expression="" field="section"/> + <default applyOnUpdate="0" expression="" field="code_dep"/> + <default applyOnUpdate="0" expression="" field="nom_com"/> + <default applyOnUpdate="0" expression="" field="code_com"/> + <default applyOnUpdate="0" expression="" field="com_abs"/> + <default applyOnUpdate="0" expression="" field="code_arr"/> + </defaults> + <constraints> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="numero"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="feuille"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="section"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="code_dep"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="nom_com"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="code_com"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="com_abs"/> + <constraint unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0" field="code_arr"/> + </constraints> + <constraintExpressions> + <constraint exp="" desc="" field="numero"/> + <constraint exp="" desc="" field="feuille"/> + <constraint exp="" desc="" field="section"/> + <constraint exp="" desc="" field="code_dep"/> + <constraint exp="" desc="" field="nom_com"/> + <constraint exp="" desc="" field="code_com"/> + <constraint exp="" desc="" field="com_abs"/> + <constraint exp="" desc="" field="code_arr"/> + </constraintExpressions> + <expressionfields/> + <attributeactions> + <defaultAction key="Canvas" value="{00000000-0000-0000-0000-000000000000}"/> + </attributeactions> + <attributetableconfig sortOrder="0" actionWidgetStyle="dropDown" sortExpression=""> + <columns> + <column type="field" name="id" hidden="0" width="-1"/> + <column type="field" name="nom" hidden="0" width="-1"/> + <column type="field" name="nom_m" hidden="0" width="-1"/> + <column type="field" name="insee_com" hidden="0" width="-1"/> + <column type="field" name="statut" hidden="0" width="-1"/> + <column type="field" name="population" hidden="0" width="-1"/> + <column type="field" name="insee_can" hidden="0" width="-1"/> + <column type="field" name="insee_arr" hidden="0" width="-1"/> + <column type="field" name="insee_dep" hidden="0" width="-1"/> + <column type="field" name="insee_reg" hidden="0" width="-1"/> + <column type="field" name="siren_epci" hidden="0" width="-1"/> + <column type="actions" hidden="1" width="-1"/> + </columns> + </attributetableconfig> + <conditionalstyles> + <rowstyles/> + <fieldstyles/> + </conditionalstyles> + <storedexpressions/> + <editform tolerant="1"></editform> + <editforminit/> + <editforminitcodesource>0</editforminitcodesource> + <editforminitfilepath></editforminitfilepath> + <editforminitcode><![CDATA[# -*- coding: utf-8 -*- +""" +Les formulaires QGIS peuvent avoir une fonction Python qui est appelée lorsque le formulaire est +ouvert. + +Utilisez cette fonction pour ajouter une logique supplémentaire à vos formulaires. + +Entrez le nom de la fonction dans le champ +"Fonction d'initialisation Python". +Voici un exemple: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") +]]></editforminitcode> + <featformsuppress>0</featformsuppress> + <editorlayout>generatedlayout</editorlayout> + <editable> + <field name="id" editable="1"/> + <field name="insee_arr" editable="1"/> + <field name="insee_can" editable="1"/> + <field name="insee_com" editable="1"/> + <field name="insee_dep" editable="1"/> + <field name="insee_reg" editable="1"/> + <field name="nom" editable="1"/> + <field name="nom_m" editable="1"/> + <field name="population" editable="1"/> + <field name="siren_epci" editable="1"/> + <field name="statut" editable="1"/> + </editable> + <labelOnTop> + <field labelOnTop="0" name="id"/> + <field labelOnTop="0" name="insee_arr"/> + <field labelOnTop="0" name="insee_can"/> + <field labelOnTop="0" name="insee_com"/> + <field labelOnTop="0" name="insee_dep"/> + <field labelOnTop="0" name="insee_reg"/> + <field labelOnTop="0" name="nom"/> + <field labelOnTop="0" name="nom_m"/> + <field labelOnTop="0" name="population"/> + <field labelOnTop="0" name="siren_epci"/> + <field labelOnTop="0" name="statut"/> + </labelOnTop> + <reuseLastValue> + <field name="id" reuseLastValue="0"/> + <field name="insee_arr" reuseLastValue="0"/> + <field name="insee_can" reuseLastValue="0"/> + <field name="insee_com" reuseLastValue="0"/> + <field name="insee_dep" reuseLastValue="0"/> + <field name="insee_reg" reuseLastValue="0"/> + <field name="nom" reuseLastValue="0"/> + <field name="nom_m" reuseLastValue="0"/> + <field name="population" reuseLastValue="0"/> + <field name="siren_epci" reuseLastValue="0"/> + <field name="statut" reuseLastValue="0"/> + </reuseLastValue> + <dataDefinedFieldProperties/> + <widgets/> + <previewExpression>"nom"</previewExpression> + <mapTip enabled="1"></mapTip> + </maplayer> </projectlayers> <layerorder> <layer id="Finds_7595ca92_4128_456d_a700_416cedf9aaa4"/> <layer id="OSM_Standard_88a32e94_cd29_412c_8b66_ee44fe338fab"/> <layer id="Ortho_20_cm_f8497a68_e819_4170_a2ce_17cc699ac2d2"/> + <layer id="Parcelles_b677c8a6_df4d_4e0a_9f9f_42287fd8263e"/> + <layer id="Communes_4866eaff_96f1_4af8_820c_6a6e1c2a757b"/> + <layer id="Context_records_94782d53_b0c1_4448_9720_44f58c1a13fa"/> </layerorder> <labelEngineSettings/> <properties> @@ -1301,9 +3155,9 @@ def my_form_open(dialog, layer, feature): </properties> <dataDefinedServerProperties> <Option type="Map"> - <Option value="" type="QString" name="name"/> + <Option type="QString" name="name" value=""/> <Option name="properties"/> - <Option value="collection" type="QString" name="type"/> + <Option type="QString" name="type" value="collection"/> </Option> </dataDefinedServerProperties> <visibility-presets/> @@ -1317,7 +3171,7 @@ def my_form_open(dialog, layer, feature): <abstract></abstract> <links/> <dates> - <date value="2025-04-29T16:38:23" type="Created"/> + <date type="Created" value="2025-04-29T16:38:23"/> </dates> <author>Thomas ANDRE</author> <creation>2025-04-29T16:38:23</creation> @@ -1327,9 +3181,9 @@ def my_form_open(dialog, layer, feature): <mapViewDocks3D/> <Bookmarks/> <Sensors/> - <ProjectViewSettings rotation="0" UseProjectScales="0"> + <ProjectViewSettings UseProjectScales="0" rotation="0"> <Scales/> - <DefaultViewExtent xmax="8.19138905262862771" ymin="41.87702493936143355" xmin="-4.83189219737137599" ymax="51.69150133263761404"> + <DefaultViewExtent xmax="8.23398533104295716" ymax="51.57939770743301011" xmin="-4.78929591895689732" ymin="41.76492131415694331"> <spatialrefsys nativeFormat="Wkt"> <wkt>GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]]</wkt> <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4> @@ -1343,40 +3197,40 @@ def my_form_open(dialog, layer, feature): </spatialrefsys> </DefaultViewExtent> </ProjectViewSettings> - <ProjectStyleSettings projectStyleId="attachment:///Rpvzry_styles.db" colorModel="Rgb" iccProfileId="attachment:///QGIS3-wynsgg" DefaultSymbolOpacity="1" RandomizeDefaultSymbolColor="1"> + <ProjectStyleSettings DefaultSymbolOpacity="1" iccProfileId="attachment:///QGIS3-wynsgg" projectStyleId="attachment:///Rpvzry_styles.db" RandomizeDefaultSymbolColor="1" colorModel="Rgb"> <databases/> </ProjectStyleSettings> - <ProjectTimeSettings timeStepUnit="h" timeStep="1" cumulativeTemporalRange="0" totalMovieFrames="100" frameRate="1"/> + <ProjectTimeSettings totalMovieFrames="100" cumulativeTemporalRange="0" frameRate="1" timeStep="1" timeStepUnit="h"/> <ElevationProperties FilterInvertSlider="0"> <terrainProvider type="flat"> - <TerrainProvider offset="0" scale="1"/> + <TerrainProvider scale="1" offset="0"/> </terrainProvider> </ElevationProperties> - <ProjectDisplaySettings CoordinateType="MapCrs" CoordinateAxisOrder="Default"> + <ProjectDisplaySettings CoordinateAxisOrder="Default" CoordinateType="MapCrs"> <BearingFormat id="bearing"> <Option type="Map"> <Option type="invalid" name="decimal_separator"/> - <Option value="6" type="int" name="decimals"/> - <Option value="0" type="int" name="direction_format"/> - <Option value="0" type="int" name="rounding_type"/> - <Option value="false" type="bool" name="show_plus"/> - <Option value="true" type="bool" name="show_thousand_separator"/> - <Option value="false" type="bool" name="show_trailing_zeros"/> + <Option type="int" name="decimals" value="6"/> + <Option type="int" name="direction_format" value="0"/> + <Option type="int" name="rounding_type" value="0"/> + <Option type="bool" name="show_plus" value="false"/> + <Option type="bool" name="show_thousand_separator" value="true"/> + <Option type="bool" name="show_trailing_zeros" value="false"/> <Option type="invalid" name="thousand_separator"/> </Option> </BearingFormat> <GeographicCoordinateFormat id="geographiccoordinate"> <Option type="Map"> - <Option value="DecimalDegrees" type="QString" name="angle_format"/> + <Option type="QString" name="angle_format" value="DecimalDegrees"/> <Option type="invalid" name="decimal_separator"/> - <Option value="6" type="int" name="decimals"/> - <Option value="0" type="int" name="rounding_type"/> - <Option value="false" type="bool" name="show_leading_degree_zeros"/> - <Option value="false" type="bool" name="show_leading_zeros"/> - <Option value="false" type="bool" name="show_plus"/> - <Option value="false" type="bool" name="show_suffix"/> - <Option value="true" type="bool" name="show_thousand_separator"/> - <Option value="false" type="bool" name="show_trailing_zeros"/> + <Option type="int" name="decimals" value="6"/> + <Option type="int" name="rounding_type" value="0"/> + <Option type="bool" name="show_leading_degree_zeros" value="false"/> + <Option type="bool" name="show_leading_zeros" value="false"/> + <Option type="bool" name="show_plus" value="false"/> + <Option type="bool" name="show_suffix" value="false"/> + <Option type="bool" name="show_thousand_separator" value="true"/> + <Option type="bool" name="show_trailing_zeros" value="false"/> <Option type="invalid" name="thousand_separator"/> </Option> </GeographicCoordinateFormat> @@ -1394,7 +3248,7 @@ def my_form_open(dialog, layer, feature): </spatialrefsys> </CoordinateCustomCrs> </ProjectDisplaySettings> - <ProjectGpsSettings destinationFollowsActiveLayer="1" autoAddTrackVertices="0" autoCommitFeatures="0" destinationLayer=""> + <ProjectGpsSettings destinationFollowsActiveLayer="1" destinationLayerProvider="ogr" destinationLayerSource="/home/thomas/StageM2/ishtar/ishtar_common/qfield/model/Finds.gpkg|layername=Finds" destinationLayer="Finds_7595ca92_4128_456d_a700_416cedf9aaa4" destinationLayerName="Finds" autoAddTrackVertices="0" autoCommitFeatures="0"> <timeStampFields/> </ProjectGpsSettings> </qgis> diff --git a/ishtar_common/qfield/model/Prospections_attachments.zip b/ishtar_common/qfield/model/Prospections_attachments.zip Binary files differindex 3932d291c..5648d20d8 100644 --- a/ishtar_common/qfield/model/Prospections_attachments.zip +++ b/ishtar_common/qfield/model/Prospections_attachments.zip diff --git a/ishtar_common/qfield/model/Prospections_qfield.zip b/ishtar_common/qfield/model/Prospections_qfield.zip Binary files differindex ee82cc69e..f748c79f9 100644 --- a/ishtar_common/qfield/model/Prospections_qfield.zip +++ b/ishtar_common/qfield/model/Prospections_qfield.zip diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py index c3ca7cfd6..909380e77 100644 --- a/ishtar_common/tests.py +++ b/ishtar_common/tests.py @@ -29,7 +29,6 @@ from time import time import zipfile from io import StringIO from unittest.runner import TextTestRunner, TextTestResult -from osgeo import ogr, osr from zipfile import ZipFile from django.apps import apps @@ -97,6 +96,7 @@ from ishtar_common.utils import ( ) from ishtar_common.tasks import launch_export from ishtar_common import utils_secretary +from ishtar_common import views_item LIB_BASE_PATH = settings.LIB_BASE_PATH FIXTURE_AUTH_PATH = settings.FIXTURE_AUTH_PATH @@ -2782,12 +2782,8 @@ class BaseImportTest(TestCase): root = os.path.join(settings.LIB_BASE_PATH, "ishtar_common") folder = os.path.join(root, "qfield", "model") dir_list = os.listdir(folder) - try: - self.assertEqual(len(dir_list), 4) - self.assertEqual(dir_list,['Finds.gpkg', 'Prospections_attachments.zip', 'Prospections_qfield.zip', 'Prospections.qgs']) - except: - self.assertEqual(len(dir_list), 5) - self.assertEqual(dir_list,['Finds.gpkg', 'Prospections_attachments.zip', 'Prospections.qgs~', 'Prospections_qfield.zip', 'Prospections.qgs']) + self.assertEqual(len(dir_list), 6) + self.assertEqual(dir_list,['Finds.gpkg', 'Prospections_attachments.zip', 'Context_records.gpkg', 'Prospections.qgs~', 'Prospections_qfield.zip', 'Prospections.qgs']) with ZipFile(os.path.join(folder, "Prospections_qfield.zip"), 'r') as zip_file: # Verification of the number of files in the .zip self.assertEqual(len(zip_file.namelist()),1) @@ -2820,73 +2816,130 @@ class BaseImportTest(TestCase): os.remove(new_file) - def test_export_qfield(self): + def export_qfield(self, mode, root, table_cols, col_names, datas): """ - :function: Test for the creation of a .gpkg, the modification of the .qgs and creation of a .zip test + :function: Core part of the test for the creation of a .gpkg, the modification of the .qgs and creation of a .zip test """ - # Verification of the original files - self.test_verify_qfield_folder() - # Preparation for the .gpkg - driver = ogr.GetDriverByName("GPKG") - root = settings.LIB_BASE_PATH + "ishtar_common/qfield/" - filename = os.path.join(root, "export", "Finds.gpkg") - # Verification to delete it if already existing - if os.path.exists(filename): - os.remove(filename) - datasource = driver.CreateDataSource(filename) - srs = osr.SpatialReference() - srs.ImportFromEPSG(4326) - # Preparation for the copy of the .qgs - qgs_path = os.path.join(root, "model", "Prospections.qgs") - new_qgs = os.path.join(root, "export", "Prospections.qgs") - # Preparation for the copy of the .zip - project = os.path.join(root, "model", "Prospections_qfield.zip") - duplicate = os.path.join(root, "export", "Prospections_qfield_export.zip") - # Verification to delete it if already existing + # 2) Creation of the .gpkg + finds, cr, list_ope, list_crea = views_item.gpkg_creation(root, table_cols, col_names, datas) + # 3) Preparations for the modification of the style in the .qgs file + qgs_path = os.path.join(root, 'model', 'Prospections.qgs') + new_qgs = os.path.join(root, 'tests', str(mode), 'Prospections.qgs') + if os.path.exists(new_qgs): + os.remove(new_qgs) + text = views_item.modification_style(qgs_path, table_cols, col_names, list_ope, list_crea) + with open(new_qgs, 'w', encoding='utf-8') as file: + file.write(text) + + # II. Duplication of the .zip for export + project = os.path.join(root, 'model', 'Prospections_qfield.zip') + duplicate = os.path.join(root, 'tests', str(mode), 'Prospections_qfield_export.zip') if os.path.exists(duplicate): os.remove(duplicate) shutil.copyfile(project, duplicate) - layer = datasource.CreateLayer("Finds", srs, ogr.wkbPoint) - list = ["x", "y", "z"] - for elem in list: - layer.CreateField(ogr.FieldDefn(elem, ogr.OFTReal)) - feature = ogr.Feature(layer.GetLayerDefn()) - for elem in list: - feature.SetField(elem, 14.0) - layer.CreateFeature(feature) - feature = None - datasource = None - # Verification of the modifications - text = open(qgs_path, encoding='utf-8').read() - for elem in list: - text = text.replace(f"champ_{elem}", elem) - with open(new_qgs, 'w', encoding='utf-8') as file: - file.write(text) - # Creation of the new .zip + + # III. Moving the .gpkg in a copy of the Qfield test project with ZipFile(duplicate, 'a') as zip_file: - zip_file.write(filename, os.path.basename(filename)) + # Adding the .gpkg to the .zip + zip_file.write(finds, os.path.basename(finds)) + zip_file.write(cr, os.path.basename(cr)) zip_file.write(new_qgs, os.path.basename(new_qgs)) + # Closing of the .zip zip_file.close() - # Verification of the content of the .zip - folder = os.path.join(root, "export") + + # IV. Verification phase + folder = os.path.join(root, 'tests', str(mode)) dir_list = os.listdir(folder) - self.assertEqual(len(dir_list), 3) - self.assertEqual(dir_list, ['Finds.gpkg', 'Prospections_qfield_export.zip','Prospections.qgs']) - with open(new_qgs, 'r', encoding='utf-8') as file: - style = file.read() - for elem in list: - bool = f'"{elem}"' in style - self.assertEqual(bool, True) - bool = f'champ_{elem}' in style - self.assertEqual(bool, False) - with ZipFile(os.path.join(folder, "Prospections_qfield_export.zip"), 'r') as zip_file: - self.assertEqual(len(zip_file.namelist()),3) - list_files = ["Prospections_attachments.zip", "Finds.gpkg", "Prospections.qgs"] + # Verification if the file was well created + self.assertEqual(len(dir_list), 2) + self.assertEqual(dir_list, ['Prospections_qfield_export.zip', 'Prospections.qgs']) + # Verification of the content of the .zip + with ZipFile(os.path.join(folder, 'Prospections_qfield_export.zip'), 'r') as zip_file: + self.assertEqual(len(zip_file.namelist()), 4) + list_files = ['Prospections_attachments.zip', 'Finds.gpkg', 'Context_records.gpkg', 'Prospections.qgs'] self.assertEqual(zip_file.namelist(), list_files) zip_file.close() - os.remove(filename) - os.remove(new_qgs) - os.remove(duplicate) + # List of modified and new values to verify the absence/presence depending on the situation + if mode == 1: + old = ['champ_id', 'champ_ue', 'champ_x', 'champ_y', 'champ_z', 'champ_wkt_modif', 'champ_nom', 'champ_ope', + 'champ_insee', 'champ_parc', 'champ_type', 'champ_occup', 'champ_desc', 'champ_loca', 'champ_media_cr', + 'champ_periode', 'champ_acti', 'champ_geom'] + new = ['Identifiant', 'UE', 'X', 'Y', 'Z', 'WKT_point', 'Unité_Enregistrement', 'Opération', 'INSEE_Commune', + 'Parcelle', 'Type', 'Interprétation', 'Description', 'Localisation', 'Media', 'Periode', 'Type_Activité', 'WKT'] + if mode == 2: + old = ['champ_id', 'champ_ue', 'champ_wkt_simple', 'champ_nom', 'champ_ope', 'champ_insee', 'champ_parc', + 'champ_type', 'champ_occup', 'champ_desc', 'champ_loca', 'champ_media_cr', 'champ_periode', 'champ_acti', 'champ_geom'] + new = ['Identifiant', 'UE', 'WKT_point', 'Unité_Enregistrement', 'Opération', 'INSEE_Commune', 'Parcelle', + 'Type', 'Interprétation', 'Description', 'Localisation', 'Media', 'Periode', 'Type_Activité', 'WKT'] + if mode == 3: + old = ['champ_nom', 'champ_ope', 'champ_geom', 'champ_id', 'champ_ue', 'champ_date', 'champ_x', 'champ_y', + 'champ_z', 'champ_matériaux', 'champ_desc', 'champ_media_finds', 'champ_wkt_modif'] + new = ['Nom', 'Opération', 'WKT_polygon', 'Identifiant', 'UE', 'Date', 'X', 'Y', 'Z', 'Description', 'Media', 'WKT_point'] + with open(new_qgs, 'r', encoding='utf-8') as file: + style = file.read() + for elem in old: + print(mode, elem) + bool = f'name="{elem}"' in style + self.assertEqual(bool, False) + for elem in new: + bool = f'name="{elem}"' in style + if not bool: + print(elem) + self.assertEqual(bool, True) + for file in dir_list: + os.remove(os.path.join(folder, file)) + + + def test_export_qfield(self): + """ + :function: Test for the creation of a .gpkg, the modification of the .qgs and creation of a .zip test + """ + # Verification of the original files + self.test_verify_qfield_folder() + + # I. Preparations + root = settings.LIB_BASE_PATH + 'ishtar_common/qfield/' + # 1) Creating the necessary datas for the test + Operation = apps.get_model('archaeological_operations', 'Operation') + OperationType = apps.get_model('ishtar_common', 'OperationType') + ope_type = OperationType.objects.create( + label='Diag', + ) + ope, __ = Operation.objects.get_or_create( + code_patriarche='Ope_Test', + operation_type=ope_type) + ContextRecord = apps.get_model('archaeological_context_records', 'ContextRecord') + cr, __ = ContextRecord.objects.get_or_create( + operation=ope, + label='Test_UE') + BaseFind = apps.get_model('archaeological_finds', 'BaseFind') + base_find, __ = BaseFind.objects.get_or_create( + context_record=cr, + label='Test_Mobilier', + external_id='Test_Mobilier', + auto_external_id=False, + x=0.7, + y=1.4, + z=2.1, + ) + + for mode in range(1, 4): + if mode == 1: + table_cols = ['label', 'context_record__label', 'geodata__x', 'geodata__y', 'geodata__z', 'geodata__point_3d'] + col_names = ['Identifiant', 'UE', 'X', 'Y', 'Z', 'WKT_point'] + datas = [['', 'Test_Mobilier', 'Test_UE', 7.0, 1.4, 2.1, 'Point Z (0.7 1.4 2.1)']] + self.export_qfield(mode, root, table_cols, col_names, datas) + if mode == 2: + table_cols = ['label', 'context_record__label', 'geodata__point_3d'] + col_names = ['Identifiant', 'UE', 'WKT_point'] + datas = [['', 'Test_Mobilier', 'Test_UE', 'POINT Z (0.7 1.4 0)']] + self.export_qfield(mode, root, table_cols, col_names, datas) + if mode == 3: + table_cols = [['label'], ['operation__code_patriarche'], ['geodata__multi_polygon']] + col_names = ['Nom', 'Opération', 'WKT_polygon'] + datas = [['', 'Test_UE', 'Ope_Test', 'MultiPolygon (((0.0 0.0, 1.0 1.0, 2.0 2.0)))']] + self.export_qfield(mode, root, table_cols, col_names, datas) + class ImportTestInterface(BaseImportTest): diff --git a/ishtar_common/views.py b/ishtar_common/views.py index a6010dfa6..b765c8e37 100644 --- a/ishtar_common/views.py +++ b/ishtar_common/views.py @@ -873,8 +873,8 @@ def get_by_importer( if importer.export_format: data_type = importer.export_format dct["type"] = importer.export_format - print(data_type) - print(dct) + #print(data_type) # debugtest + #print(dct) # debugtest if data_type == "csv" or dct.get("type", "") == "csv": obj_name = importer.name elif data_type == "gpkg" or dct.get("type", "") == "gpkg": diff --git a/ishtar_common/views_item.py b/ishtar_common/views_item.py index bd8780ea9..e697a2435 100644 --- a/ishtar_common/views_item.py +++ b/ishtar_common/views_item.py @@ -3221,38 +3221,9 @@ def get_item( writer.writerow(vals) return response elif data_type == "gpkg": - # Work in progress # I. Preparations - driver = ogr.GetDriverByName("GPKG") root = settings.LIB_BASE_PATH + "ishtar_common/qfield/" - # 1) Creation of the .gpkg - filename = os.path.join(root, "export", "Finds.gpkg") - # Verification to delete it if already existing - if os.path.exists(filename): - os.remove(filename) - datasource = driver.CreateDataSource(filename) - srs = osr.SpatialReference() - srs.ImportFromEPSG(4326) - # 2) Preparations for the modification of the style in the .qgs file - qgs_path = os.path.join(root, "model", "Prospections.qgs") - new_qgs = os.path.join(root, "export", "Prospections.qgs") - if os.path.exists(new_qgs): - os.remove(new_qgs) - # 3) Duplication of the .zip for export - project = os.path.join(root, "model", "Prospections_qfield.zip") - duplicate = os.path.join(root, "export", "Prospections_qfield_export.zip") - if os.path.exists(duplicate): - os.remove(duplicate) - shutil.copyfile(project, duplicate) - # II. Populating of the .gpkg - # 1) Layer creation with verification of the type of geometry to create - if "base_finds__point_2d" in table_cols: - layer = datasource.CreateLayer("Finds", srs, ogr.wkbPoint) - elif any(elem in table_cols for elem in ["base_finds__point_3d", "_z"]): - layer = datasource.CreateLayer("Finds", srs, ogr.wkbPoint25D) - else: - layer = datasource.CreateLayer("Finds", srs, ogr.wkbPolygon) - # 2) Getting all the column names (copy from below) + # 1) Getting all the column names (copy from below) if col_names: col_names = [name for name in col_names] else: @@ -3277,105 +3248,426 @@ def get_item( ) continue col_names.append(str(field.verbose_name)) - # 3) Creation of the attributes - print("II.3)") - for idx in range(0, len(col_names)): - if any(elem in table_cols[idx] for elem in ["index", "order", "quantity", "taq", "tpq", "year"]): - layer.CreateField(ogr.FieldDefn(col_names[idx], ogr.OFTInteger64)) - elif any(elem in table_cols[idx] for elem in ["_x", "_y", "_z", "circumference", "cost", "depth", "diameter", "height", "length", "number", "surface", "side", "thickness", "value", "volume", "weight", "width"]): - layer.CreateField(ogr.FieldDefn(col_names[idx], ogr.OFTReal)) - elif "_date" in table_cols[idx]: - layer.CreateField(ogr.FieldDefn(col_names[idx], ogr.OFTDate)) - elif "_datetime" in table_cols[idx]: - layer.CreateField(ogr.FieldDefn(col_names[idx], ogr.OFTDateTime)) - elif any(elem in table_cols[idx] for elem in ["large_area_prescription", "is_complete", "executed"]): - layer.CreateField(ogr.FieldDefn(col_names[idx], ogr.OFTBinary)) - else: - layer.CreateField(ogr.FieldDefn(col_names[idx], ogr.OFTString)) - idx += 1 - max = len(col_names) - # Looping on all the datas extracted to create features - for data in datas: - # Creation of a new feature - feature = ogr.Feature(layer.GetLayerDefn()) - # Preparations for the geometry - point = "" - geom_x = "" - geom_y = "" - geom_z = "" - # Looping on the attributes to add them to the feature - for idx in range (0, max) : - # 4) Completion of the attributes - if any(elem == table_cols[idx] for elem in ["_date", "_datetime"]): - # Preparations for specific values for the date and date_time - try: - # First version if it has all the data necessary for an ogr.OFTDateTime - # +1 because the first value in the attributes is '' - feature.SetField(col_names[idx], data[idx + 1]) - except: - # Second version if some values are missing - # +1 because the first value in the attributes is '' - feature.SetField(col_names[idx], data[idx + 1].year, data[idx + 1].month, data[idx + 1].day, 0, 0, 0) - else: - # +1 because the first value in the attributes is '' - feature.SetField(col_names[idx], str(data[idx + 1])) - # 5) Gestion of the geometry - if any(elem in table_cols for elem in ["base_finds__point_2d", "base_finds__point_3d", "_line", "_points", "_polygon"]): - if table_cols[idx] in ["base_finds__point_2d", "base_finds__point_3d", "_line", "_points", "_polygon"]: - try: - point = ogr.CreateGeometryFromWkt(data[idx + 1].split(";")[1]) - except: - pass - else: - if "base_finds__x" and "base_finds__y" in table_cols: - if table_cols[idx] == "base_finds__x": - geom_x = data[idx + 1] - elif table_cols[idx] == "base_finds__y": - geom_y = data[idx + 1] - if "base_finds__z" in table_cols: - if table_cols[idx] == "base_finds__z": - geom_z = data[idx + 1] - # Prevent problems when both x,y and geometry are present - if point == "" and geom_x != "" and geom_y != "": - if geom_z != "": - point = ogr.Geometry(ogr.wkbPoint25D) - point.AddPoint(float(geom_x), float(geom_y), float(geom_z)) - else: - point = ogr.Geometry(ogr.wkbPoint) - point.AddPoint(float(geom_x), float(geom_y)) - if point != "": - feature.SetGeometry(point) - layer.CreateFeature(feature) - feature = None - datasource = None - # 6) Modification of the style - list_ref = ["champ_id", "champ_date", "champ_datetime", "champ_x", "champ_y", "champ_z", "champ_media", "champ_wkt_2d", "champ_wkt_3d"] - list_search = ["label", "_date", "_datetime", "base_finds__x", "base_finds__y", "base_finds__z", "_image", "__point_2d", "__point_2d"] - text = open(qgs_path, encoding='utf-8').read() - for elem in list_search: - for col in table_cols: - if elem in col: - id_old = list_search.index(elem) - id_new = table_cols.index(col) - text = text.replace(list_ref[id_old], col_names[id_new]) - else: - pass + # 2) Creation of the .gpkg + finds, cr, list_ope, list_crea = gpkg_creation(root, table_cols, col_names, datas) + # 3) Preparations for the modification of the style in the .qgs file + qgs_path = os.path.join(root, 'model', 'Prospections.qgs') + new_qgs = os.path.join(root, 'export', 'Prospections.qgs') + if os.path.exists(new_qgs): + os.remove(new_qgs) + text = modification_style(qgs_path, table_cols, col_names, list_ope, list_crea) with open(new_qgs, 'w', encoding='utf-8') as file: file.write(text) + # II. Duplication of the .zip for export + project = os.path.join(root, 'model', 'Prospections_qfield.zip') + duplicate = os.path.join(root, 'export', 'Prospections_qfield_export.zip') + if os.path.exists(duplicate): + os.remove(duplicate) + shutil.copyfile(project, duplicate) # III. Moving the .gpkg in a copy of the Qfield test project with ZipFile(duplicate, 'a') as zip_file: # Adding the .gpkg to the .zip - zip_file.write(filename, os.path.basename(filename)) + zip_file.write(finds, os.path.basename(finds)) + zip_file.write(cr, os.path.basename(cr)) zip_file.write(new_qgs, os.path.basename(new_qgs)) # Closing of the .zip zip_file.close() response = HttpResponse(open(duplicate, 'rb'), content_type='application/zip') response['Content-Disposition'] = 'attachment; filename="Qfield_prospections.zip"' return response - return HttpResponse("{}", content_type="text/plain") + return HttpResponse('{}', content_type='text/plain') return func +def gpkg_creation(root, table_cols, col_names, datas): + # 1) Creation of the Geopackage + finds = os.path.join(root, 'export', 'Finds.gpkg') + # Verification to delete it if already existing + if os.path.exists(finds): + os.remove(finds) + driver = ogr.GetDriverByName('GPKG') + datasource = driver.CreateDataSource(finds) + srs = osr.SpatialReference() + srs.ImportFromEPSG(4326) + # 2) Verufucation of the origin of the export + origin = geometry_attribution(table_cols, datas) + # 3a) Case where the extraction come from Finds + if origin == 'finds': + # 4a) Creation of the finds layer and its attributes + layer = datasource.CreateLayer('Finds', srs, ogr.wkbPoint25D) + layer = attributes_creation_finds_a(layer, col_names, table_cols) + # 5a) Populating the finds layer with the datas + list_cr = populating_layer_finds(layer,table_cols,col_names,datas) + datasource = None + # 6a) Creation of the Context Records file + cr = os.path.join(root, 'export', 'Context_records.gpkg') + # Verification to delete it if already existing + if os.path.exists(cr): + os.remove(cr) + datasource = driver.CreateDataSource(cr) + srs = osr.SpatialReference() + srs.ImportFromEPSG(4326) + # 7a) Creation of the cr's layer and a list of default attrbutes + layer = datasource.CreateLayer('Context_records', srs, ogr.wkbMultiPolygon) + list_crea = ['Unité_Enregistrement', 'Opération', 'INSEE_Commune', 'Parcelle', 'Type', 'Interprétation', + 'Description', 'Localisation', 'Media', 'Periode', 'Type_Activité', 'WKT'] + layer = attributes_creation_cr_a(layer, list_crea) + # 8a) Populating the cr's layer with datas from the cr of the extracted finds + list_ope = populating_layer_cr_a(layer, list_crea, list_cr) + datasource = None + # 9a) Preparation of a list of the attributes names for the style modifications + list_crea = ['cr', list_crea] + else: + # 4b) Creation of the finds layer and a list of default attrbutes + layer = datasource.CreateLayer('Finds', srs, ogr.wkbPoint25D) + list_crea = ['Identifiant', 'UE', 'Date', 'X', 'Y', 'Z', 'Matériaux', 'Description', 'Media', 'WKT_point'] + attributes_creation_finds_b(layer, list_crea) + datasource = None + # 5b) Creation of the Context Records file + cr = os.path.join(root, 'export', 'Context_records.gpkg') + # Verification to delete it if already existing + if os.path.exists(cr): + os.remove(cr) + datasource = driver.CreateDataSource(cr) + srs = osr.SpatialReference() + srs.ImportFromEPSG(4326) + # 6a) Creation of the cr's layer and its attributes + layer = datasource.CreateLayer('Context_records', srs, ogr.wkbMultiPolygon) + layer = attributes_creation_cr_b(layer, col_names, table_cols) + # 7b) Populating the cr's layer with the datas + list_ope = populating_layer_cr_b(layer, table_cols, col_names, datas) + # 8b) Preparation of a list of the attributes names for the style modifications + list_crea = ['finds', list_crea] + return finds, cr, list_ope, list_crea + + +def geometry_attribution (table_cols, datas): + # Getting the name of the first element, two cases because in the case of Context Records, all elements are in lists + try: + id_label = table_cols.index('label') + name = datas[0][id_label + 1] + except: + id_label = table_cols.index(['label']) + name = datas[0][id_label + 1][0] + # Recuperation of the BaseFind datas + BaseFind = apps.get_model('archaeological_finds', 'BaseFind') + references = BaseFind.objects.order_by('-pk') + # Verification if the extracted elements come from BaseFind or, by default, from Context Records + if any(elem.label == name for elem in references): + origin = 'finds' + else: + origin = 'cr' + return origin + + +def attributes_creation_finds_a(layer, col_names, table_cols): + # print(table_cols) # debugtest + # print(col_names) # debugtest + # print(datas) # debugtest + # Looping on all the attributes + for idx in range(0, len(col_names)): + # Prevent missing values (case in some .gpkg) + if table_cols[idx] != '': + # print(table_cols[idx]) # debugtest + # print(col_names[idx]) # debugtest + # Gestion of specific formats of attributes + if any(elem in table_cols[idx] for elem in ['index', 'order', 'quantity', 'taq', 'tpq', 'year']): + layer.CreateField(ogr.FieldDefn(col_names[idx], ogr.OFTInteger64)) + elif any(elem in table_cols[idx] for elem in + ['_x', '_y', '_z', 'circumference', 'cost', 'depth', 'diameter', 'height', 'length', 'number', + 'surface', 'side', 'thickness', 'value', 'volume', 'weight', 'width']): + layer.CreateField(ogr.FieldDefn(col_names[idx], ogr.OFTReal)) + elif '_date' in table_cols[idx]: + layer.CreateField(ogr.FieldDefn(col_names[idx], ogr.OFTDate)) + elif '_datetime' in table_cols[idx]: + layer.CreateField(ogr.FieldDefn(col_names[idx], ogr.OFTDateTime)) + elif any(elem in table_cols[idx] for elem in ['large_area_prescription', 'is_complete', 'executed']): + layer.CreateField(ogr.FieldDefn(col_names[idx], ogr.OFTBinary)) + else: + layer.CreateField(ogr.FieldDefn(col_names[idx], ogr.OFTString)) + return layer + + +def populating_layer_finds(layer, table_cols, col_names, datas): + max = len(col_names) + list_cr = [] + # Looping on all the datas extracted to create features + for data in datas: + # Creation of a new feature + feature = ogr.Feature(layer.GetLayerDefn()) + # Preparations for the geometry + point = '' + # Looping on the attributes to add them to the feature + for idx in range(0, max): + if col_names[idx] != '': + # print(col_names[idx]) # debugtest + # print(data[idx + 1]) # debugtest + # 4) Completion of the attributes + if any(elem == table_cols[idx] for elem in ['_date', '_datetime']): + # Preparations for specific values for the date and date_time + try: + # First version if it has all the data necessary for an ogr.OFTDateTime + # +1 because the first value in the attributes is '' + feature.SetField(col_names[idx], data[idx + 1]) + except: + # Second version if some values are missing + # +1 because the first value in the attributes is '' + feature.SetField(col_names[idx], data[idx + 1].year, data[idx + 1].month, data[idx + 1].day, 0, + 0, 0) + elif 'context_record__label' in table_cols[idx] and data[idx + 1] not in list_cr: + list_cr.append(data[idx + 1]) + feature.SetField(col_names[idx], str(data[idx + 1])) + else: + # +1 because the first value in the attributes is '' + feature.SetField(col_names[idx], str(data[idx + 1])) + # Gestion of the geometry + id_label = table_cols.index('label') + BaseFind = apps.get_model('archaeological_finds', 'BaseFind') + name = data[id_label + 1] + object, __ = BaseFind.objects.get_or_create( + label=name, + ) + try: + point = ogr.Geometry(ogr.wkbPoint25D) + point.AddPoint(float(object.x), float(object.y), float(object.z)) + except: + try: + point = ogr.Geometry(ogr.wkbPoint25D) + point.AddPoint(float(object.x), float(object.y), float(0.0)) + except: + pass + if point != '': + feature.SetGeometry(point) + # Addition of the new feature + layer.CreateFeature(feature) + feature = None + return list_cr + + +def attributes_creation_finds_b(layer, list_crea): + # Gestion of specific types of attributes for the default values + for attribute in list_crea: + if attribute == 'Date': + layer.CreateField(ogr.FieldDefn(attribute, ogr.OFTDate)) + elif attribute in ['X', 'Y', 'Z']: + layer.CreateField(ogr.FieldDefn(attribute, ogr.OFTReal)) + else: + layer.CreateField(ogr.FieldDefn(attribute, ogr.OFTString)) + return layer + + +def attributes_creation_cr_a(layer, list_crea): + for idx in range(0, len(list_crea)): + layer.CreateField(ogr.FieldDefn(list_crea[idx], ogr.OFTString)) + return layer + + +def populating_layer_cr_a(layer, list_crea, list_cr): + list_ope = [] + # Query in the DataBase to get information on the Context Records of the Finds exported + ContextRecord = apps.get_model('archaeological_context_records', 'ContextRecord') + for name in list_cr: + cr, __ = ContextRecord.objects.get_or_create( + label=name + ) + list_attributes = [] + try:list_attributes.append(cr.label) + except:list_attributes.append('Null') + try:list_attributes.append(str(cr.operation.code_patriarche)) + except:list_attributes.append('Null') + try:list_attributes.append(cr.town.numero_insee) + except:list_attributes.append('Null') + try:list_attributes.append(cr.parcel.external_id) + except:list_attributes.append('Null') + try:list_attributes.append(str(cr.unit)) + except:list_attributes.append('Null') + try:list_attributes.append(cr.operation.interpretation) + except:list_attributes.append('Null') + try:list_attributes.append(cr.description) + except:list_attributes.append('Null') + try:list_attributes.append(cr.location) + except:list_attributes.append('Null') + try:list_attributes.append(cr.documents.image) + except:list_attributes.append('Null') + try:list_attributes.append(cr.datings.period) + except:list_attributes.append('Null') + try:list_attributes.append(str(cr.activity)) + except:list_attributes.append('Null') + try:list_attributes.append(str(cr.main_geodata.multi_polygon)) + except:list_attributes.append('Null') + # Creation of a new feature + feature = ogr.Feature(layer.GetLayerDefn()) + for idx in range(0, len(list_crea)-1): + try: + feature.SetField(list_crea[idx], list_attributes[idx]) + except: + pass + if list_attributes[1] not in list_ope: + list_ope.append(list_attributes[1]) + try: + geom = ogr.CreateGeometryFromWkt(str(list_attributes[-1]).split(';')[-1]) + feature.SetGeometry(geom) + except: + pass + layer.CreateFeature(feature) + feature = None + return list_ope + + +def attributes_creation_cr_b(layer, col_names, table_cols): + for idx in range(0, len(col_names)): + if table_cols[idx] != '': + # print(table_cols[idx]) # debugtest + # print(col_names[idx]) # debugtest + layer.CreateField(ogr.FieldDefn(col_names[idx], ogr.OFTString)) + return layer + + +def populating_layer_cr_b(layer, table_cols, col_names, datas): + #print(table_cols) #debugtest + #print(col_names) #debugtest + #print(datas) #debugtest + list_ope = [] + geom = '' + max = len(col_names) + for data in datas: + # Creation of a new feature + feature = ogr.Feature(layer.GetLayerDefn()) + for idx in range(0, max): + if col_names[idx] != '': + if 'operation__code_patriarche' in table_cols[idx] and data[idx + 1] not in list_ope: + list_ope.append(data[idx + 1]) + feature.SetField(col_names[idx], str(data[idx + 1])) + else: + feature.SetField(col_names[idx], str(data[idx + 1])) + id_label = table_cols.index(['label']) + name = datas[0][id_label + 1] + ContextRecord = apps.get_model('archaeological_context_records', 'ContextRecord') + cr, __ = ContextRecord.objects.get_or_create( + label=name + ) + print(str(cr.multi_polygon)) + try: + geom = ogr.CreateGeometryFromWkt(str(cr.geodata.multi_polygon).split(';')[-1]) + except: + try: + geom = ogr.CreateGeometryFromWkt(str(cr.main_geodata.multi_polygon).split(';')[-1]) + except: + pass + if geom != '': + feature.SetGeometry(geom) + layer.CreateFeature(feature) + feature = None + return list_ope + + +def modification_style(qgs_path, table_cols, col_names, list_ope, list_crea): + # Lists of default names in the style, attribut names of the datas and new default names + list_ref = ['champ_date', 'champ_datetime', 'champ_x', 'champ_y', 'champ_z', 'champ_ue', + 'champ_ope', 'champ_insee', 'champ_parc', 'champ_geom'] + list_search = ['_date', '_datetime', 'base_finds__x', 'base_finds__y', 'base_finds__z', 'context_record__label', + 'operation__code_patriarche', 'town__numero_insee', 'parcel__external_id', + 'geodata__multi_polygon'] + list_auto = ['Date', 'Date/Temps', 'X', 'Y', 'Z', 'UE', 'Opération', 'INSEE_Commune', 'Parcelle', 'WKT'] + # Opening of the style + text = open(qgs_path, encoding='utf-8').read() + # Adding the different Operations linked of the Contexts Records and/or Finds exported to a list of possible values + if len(list_ope) > 0: + new_text = "" + for ope in list_ope: + choice = ' <Option type="Map">\n <Option name="{}" value="{}" type="QString"/>\n </Option>\n'.format(ope, ope) + new_text += choice + old_text = ' <Option type="Map">\n <Option type="QString" name="Test_choice" value="Test_choice"/>\n </Option>\n' + text = text.replace(old_text, new_text) + else: + text = text.replace("Test_choice", "Null") + # Specifics modifications if the datas don't come from Finds + if list_crea[0] == 'finds': + print(table_cols) + for ref in list_ref: + id_ref = list_ref.index(ref) + new = '' + for col in table_cols: + if list_search[id_ref] in col[0]: + print('A') + id_new = table_cols.index(col) + new = col_names[id_new] + print(col, new) + if new == '': + print('B') + new = list_auto[id_ref] + print(new) + print(ref, new) + text = text.replace(ref, new) + # List of corresponding default names in the style linked to the default names used for the Finds + list_corr = ['champ_id', 'champ_ue', 'champ_date', 'champ_x', 'champ_y', 'champ_z', 'champ_matériaux', + 'champ_desc', 'champ_media_finds', 'champ_wkt_modif'] + # Gestion of the link between the Finds and Context Records layers + id_label = table_cols.index(['label']) + new = col_names[id_label] + text = text.replace("champ_nom", new) + if ['documents__image'] in table_cols: + id_media = table_cols.index(['documents__image']) + # Gestion of the link between the Finds and Context Records layers + new = col_names[id_media] + text = text.replace("champ_media_cr", new) + # Replacement of the values from the default names used for the Finds + n = 0 + for elem in list_crea[1]: + old = list_corr[n] + text = text.replace(old, elem) + n += 1 + # Specifics modifications if the datas don't come from Context_Records + elif list_crea[0] == 'cr': + for ref in list_ref: + id_ref = list_ref.index(ref) + new = '' + for col in table_cols: + if list_search[id_ref] in col: + id_new = table_cols.index(col) + if new == '': + new = list_auto[id_ref] + text = text.replace(ref, new) + # List of corresponding default names in the style linked to the default names used for the Finds + list_corr = ['champ_nom', 'champ_ope', 'champ_insee', 'champ_parc', 'champ_type', 'champ_occup', 'champ_desc', + 'champ_loca', 'champ_media_cr', 'champ_periode', 'champ_acti', 'champ_geom'] + # Test in case the all names of attributes are in lists + try: + id_label = table_cols.index(['label']) + except: + id_label = table_cols.index('label') + # Gestion of the link between the Finds and Context Records layers + new = col_names[id_label] + text = text.replace('champ_id', new) + if 'documents__image' in table_cols: + try: + id_media = table_cols.index(['documents__image']) + except: + id_media = table_cols.index('documents__image') + # Gestion of the link between the Finds and Context Records layers + new = col_names[id_media] + text = text.replace("champ_media_finds", new) + # Specific case to assure the good registration of the z coordinate + if 'geodata__point_3d' in table_cols: + id_new = table_cols.index('geodata__point_3d') + if any('__z' in elem for elem in table_cols): + ref = "champ_wkt_modif" + new = col_names[id_new] + else: + ref = "champ_wkt_simple" + new = col_names[id_new] + text = text.replace(ref, new) + # Replacement of the values from the default names used for the Context Records + n = 0 + for elem in list_crea[1]: + old = list_corr[n] + text = text.replace(old, elem) + n += 1 + else: + pass + return text + + def adapt_distant_search(params, src, model): if "search_vector" in params and params["search_vector"]: search_vector = params["search_vector"][0] |