Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable GPX export for polygon layer #20

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tests/data/polygon.geojson
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "FeatureCollection",
"name": "test_polygon",
"features": [
{
"type": "Feature",
"properties": { "id": 1, "name": "éù%@ > 1" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 3.80, 43.50 ], [ 3.80, 43.60 ], [ 3.90, 43.60 ], [ 3.90, 43.50 ], [ 3.80, 43.50 ] ] ] } }
]
}
376 changes: 376 additions & 0 deletions tests/data/polygon.qgs
Original file line number Diff line number Diff line change
@@ -0,0 +1,376 @@
<qgis projectname="" version="3.10.13-A Coruña">
<homePath path=""></homePath>
<title></title>
<autotransaction active="0"></autotransaction>
<evaluateDefaultValues active="0"></evaluateDefaultValues>
<trust active="0"></trust>
<projectCrs>
<spatialrefsys>
<wkt>GEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],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["unknown"],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>
</projectCrs>
<layer-tree-group>
<customproperties></customproperties>
<layer-tree-layer checked="Qt::Checked" expanded="1" id="polygon_d135b711_320e_40e1_848f_c601703deaf2" legend_exp="" name="polygon" providerKey="ogr" source="./polygon.geojson">
<customproperties></customproperties>
</layer-tree-layer>
<custom-order enabled="0">
<item>polygon_d135b711_320e_40e1_848f_c601703deaf2</item>
</custom-order>
</layer-tree-group>
<snapping-settings enabled="0" intersection-snapping="0" mode="2" tolerance="12" type="1" unit="1">
<individual-layer-settings>
<layer-setting enabled="0" id="polygon_d135b711_320e_40e1_848f_c601703deaf2" tolerance="12" type="1" units="1"></layer-setting>
</individual-layer-settings>
</snapping-settings>
<relations></relations>
<mapcanvas annotationsVisible="1" name="theMapCanvas">
<units>degrees</units>
<extent>
<xmin>3.79749999999999943</xmin>
<ymin>43.49749999999999517</ymin>
<xmax>3.90249999999999986</xmax>
<ymax>43.60249999999999915</ymax>
</extent>
<rotation>0</rotation>
<destinationsrs>
<spatialrefsys>
<wkt>GEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],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["unknown"],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>
</destinationsrs>
<rendermaptile>0</rendermaptile>
<expressionContextScope></expressionContextScope>
</mapcanvas>
<projectModels></projectModels>
<legend updateDrawingOrder="true">
<legendlayer checked="Qt::Checked" drawingOrder="-1" name="polygon" open="true" showFeatureCount="0">
<filegroup hidden="false" open="true">
<legendlayerfile isInOverview="0" layerid="polygon_d135b711_320e_40e1_848f_c601703deaf2" visible="1"></legendlayerfile>
</filegroup>
</legendlayer>
</legend>
<mapViewDocks></mapViewDocks>
<mapViewDocks3D></mapViewDocks3D>
<mapcanvas annotationsVisible="1" name="mAreaCanvas">
<units>degrees</units>
<extent>
<xmin>0</xmin>
<ymin>0</ymin>
<xmax>0</xmax>
<ymax>0</ymax>
</extent>
<rotation>0</rotation>
<destinationsrs>
<spatialrefsys>
<wkt>GEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],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["unknown"],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>
</destinationsrs>
<rendermaptile>0</rendermaptile>
<expressionContextScope></expressionContextScope>
</mapcanvas>
<mapcanvas annotationsVisible="1" name="mAreaCanvas">
<units>degrees</units>
<extent>
<xmin>0</xmin>
<ymin>0</ymin>
<xmax>0</xmax>
<ymax>0</ymax>
</extent>
<rotation>0</rotation>
<destinationsrs>
<spatialrefsys>
<wkt>GEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],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["unknown"],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>
</destinationsrs>
<rendermaptile>0</rendermaptile>
<expressionContextScope></expressionContextScope>
</mapcanvas>
<mapcanvas annotationsVisible="1" name="mAreaCanvas">
<units>degrees</units>
<extent>
<xmin>0</xmin>
<ymin>0</ymin>
<xmax>0</xmax>
<ymax>0</ymax>
</extent>
<rotation>0</rotation>
<destinationsrs>
<spatialrefsys>
<wkt>GEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],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["unknown"],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>
</destinationsrs>
<rendermaptile>0</rendermaptile>
<expressionContextScope></expressionContextScope>
</mapcanvas>
<projectlayers>
<maplayer autoRefreshEnabled="0" autoRefreshTime="0" geometry="Polygon" hasScaleBasedVisibilityFlag="0" labelsEnabled="0" maxScale="0" minScale="1e+08" readOnly="0" refreshOnNotifyEnabled="0" refreshOnNotifyMessage="" simplifyAlgorithm="0" simplifyDrawingHints="1" simplifyDrawingTol="1" simplifyLocal="1" simplifyMaxScale="1" styleCategories="AllStyleCategories" type="vector" wkbType="Polygon">
<extent>
<xmin>3.79999999999999982</xmin>
<ymin>43.5</ymin>
<xmax>3.89999999999999991</xmax>
<ymax>43.60000000000000142</ymax>
</extent>
<id>polygon_d135b711_320e_40e1_848f_c601703deaf2</id>
<datasource>./polygon.geojson</datasource>
<keywordList>
<value></value>
</keywordList>
<layername>polygon</layername>
<srs>
<spatialrefsys>
<wkt>GEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],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["unknown"],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>
<links></links>
<fees></fees>
<encoding></encoding>
<crs>
<spatialrefsys>
<wkt></wkt>
<proj4></proj4>
<srsid>0</srsid>
<srid>0</srid>
<authid></authid>
<description></description>
<projectionacronym></projectionacronym>
<ellipsoidacronym></ellipsoidacronym>
<geographicflag>false</geographicflag>
</spatialrefsys>
</crs>
<extent></extent>
</resourceMetadata>
<provider encoding="UTF-8">ogr</provider>
<vectorjoins></vectorjoins>
<layerDependencies></layerDependencies>
<dataDependencies></dataDependencies>
<legend type="default-vector"></legend>
<expressionfields></expressionfields>
<map-layer-style-manager current="défaut">
<map-layer-style name="défaut"></map-layer-style>
</map-layer-style-manager>
<auxiliaryLayer></auxiliaryLayer>
<flags>
<Identifiable>1</Identifiable>
<Removable>1</Removable>
<Searchable>1</Searchable>
</flags>
<renderer-v2 enableorderby="0" forceraster="0" symbollevels="0" type="singleSymbol">
<symbols>
<symbol alpha="1" clip_to_extent="1" force_rhr="0" name="0" type="fill">
<layer class="SimpleFill" enabled="1" locked="0" pass="0">
<prop k="border_width_map_unit_scale" v="3x:0,0,0,0,0,0"></prop>
<prop k="color" v="231,113,72,255"></prop>
<prop k="joinstyle" v="bevel"></prop>
<prop k="offset" v="0,0"></prop>
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"></prop>
<prop k="offset_unit" v="MM"></prop>
<prop k="outline_color" v="35,35,35,255"></prop>
<prop k="outline_style" v="solid"></prop>
<prop k="outline_width" v="0.26"></prop>
<prop k="outline_width_unit" v="MM"></prop>
<prop k="style" v="solid"></prop>
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""></Option>
<Option name="properties"></Option>
<Option name="type" type="QString" value="collection"></Option>
</Option>
</data_defined_properties>
</layer>
</symbol>
</symbols>
<rotation></rotation>
<sizescale></sizescale>
</renderer-v2>
<customproperties></customproperties>
<blendMode>0</blendMode>
<featureBlendMode>0</featureBlendMode>
<layerOpacity>1</layerOpacity>
<geometryOptions geometryPrecision="0" removeDuplicateNodes="0">
<activeChecks type="StringList">
<Option type="QString" value=""></Option>
</activeChecks>
<checkConfiguration></checkConfiguration>
</geometryOptions>
<fieldConfiguration>
<field name="id">
<editWidget type="">
<config>
<Option></Option>
</config>
</editWidget>
</field>
<field name="name">
<editWidget type="">
<config>
<Option></Option>
</config>
</editWidget>
</field>
</fieldConfiguration>
<aliases>
<alias field="id" index="0" name=""></alias>
<alias field="name" index="1" name=""></alias>
</aliases>
<excludeAttributesWMS></excludeAttributesWMS>
<excludeAttributesWFS></excludeAttributesWFS>
<defaults>
<default applyOnUpdate="0" expression="" field="id"></default>
<default applyOnUpdate="0" expression="" field="name"></default>
</defaults>
<constraints>
<constraint constraints="0" exp_strength="0" field="id" notnull_strength="0" unique_strength="0"></constraint>
<constraint constraints="0" exp_strength="0" field="name" notnull_strength="0" unique_strength="0"></constraint>
</constraints>
<constraintExpressions>
<constraint desc="" exp="" field="id"></constraint>
<constraint desc="" exp="" field="name"></constraint>
</constraintExpressions>
<expressionfields></expressionfields>
<attributeactions>
<defaultAction key="Canvas" value="{00000000-0000-0000-0000-000000000000}"></defaultAction>
</attributeactions>
<attributetableconfig actionWidgetStyle="dropDown" sortExpression="" sortOrder="0">
<columns></columns>
</attributetableconfig>
<conditionalstyles>
<rowstyles></rowstyles>
<fieldstyles></fieldstyles>
</conditionalstyles>
<storedexpressions></storedexpressions>
<editform tolerant="1"></editform>
<editforminit></editforminit>
<editforminitcodesource>0</editforminitcodesource>
<editforminitfilepath></editforminitfilepath>
<editforminitcode></editforminitcode>
<featformsuppress>0</featformsuppress>
<editorlayout>generatedlayout</editorlayout>
<editable></editable>
<labelOnTop></labelOnTop>
<widgets></widgets>
<previewExpression></previewExpression>
<mapTip></mapTip>
</maplayer>
</projectlayers>
<layerorder>
<layer id="polygon_d135b711_320e_40e1_848f_c601703deaf2"></layer>
</layerorder>
<properties>
<Gui>
<CanvasColorBluePart type="int">255</CanvasColorBluePart>
<CanvasColorGreenPart type="int">255</CanvasColorGreenPart>
<CanvasColorRedPart type="int">255</CanvasColorRedPart>
<SelectionColorAlphaPart type="int">255</SelectionColorAlphaPart>
<SelectionColorBluePart type="int">0</SelectionColorBluePart>
<SelectionColorGreenPart type="int">255</SelectionColorGreenPart>
<SelectionColorRedPart type="int">255</SelectionColorRedPart>
</Gui>
<Legend>
<filterByMap type="bool">false</filterByMap>
</Legend>
<Measure>
<Ellipsoid type="QString">EPSG:7030</Ellipsoid>
</Measure>
<Measurement>
<AreaUnits type="QString">m2</AreaUnits>
<DistanceUnits type="QString">meters</DistanceUnits>
</Measurement>
<PAL>
<CandidatesLine type="int">50</CandidatesLine>
<CandidatesPoint type="int">16</CandidatesPoint>
<CandidatesPolygon type="int">30</CandidatesPolygon>
<DrawRectOnly type="bool">false</DrawRectOnly>
<DrawUnplaced type="bool">false</DrawUnplaced>
<SearchMethod type="int">0</SearchMethod>
<ShowingAllLabels type="bool">false</ShowingAllLabels>
<ShowingCandidates type="bool">false</ShowingCandidates>
<ShowingPartialsLabels type="bool">true</ShowingPartialsLabels>
<TextFormat type="int">0</TextFormat>
<UnplacedColor type="QString">255,0,0,255</UnplacedColor>
</PAL>
<Paths>
<Absolute type="bool">false</Absolute>
</Paths>
<PositionPrecision>
<Automatic type="bool">true</Automatic>
<DecimalPlaces type="int">2</DecimalPlaces>
</PositionPrecision>
<SpatialRefSys>
<ProjectionsEnabled type="int">1</ProjectionsEnabled>
</SpatialRefSys>
</properties>
<visibility-presets></visibility-presets>
<transformContext></transformContext>
<projectMetadata>
<identifier></identifier>
<parentidentifier></parentidentifier>
<language></language>
<type></type>
<title></title>
<abstract></abstract>
<links></links>
<author>Etienne</author>
<creation>2021-01-06T18:39:46</creation>
</projectMetadata>
<Annotations></Annotations>
<Layouts></Layouts>
<Bookmarks></Bookmarks>
<ProjectViewSettings UseProjectScales="0">
<Scales></Scales>
</ProjectViewSettings>
</qgis>
Loading