[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qgis-user
Subject:    Re: [Qgis-user] [QGIS-Developer] Delete unnecessary PyQGIS attributes
From:       Charles Dixon-Paver <charles () kartoza ! com>
Date:       2020-09-22 15:42:49
Message-ID: CAK2KqicjXceEs6wVueRgxZSPy-oEd+rZ1NABjpKRK2y+C-FaGA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/related)]

[Attachment #4 (multipart/alternative)]


Hi Mathias, this question seems more appropriate for the QGIS User group,
so I'm migrating the conversation there.

The description you've given lacks enough detail for me to have a clear
understanding of your intentions, so perhaps in the future you could
provide a link to some sample data and more detail on your objectives so
that others might be able to assist.

From what I can gather from the discussion on stack overflow, you intend
to remove the attributes of all features on one layer that intersect
another layer spatially. To do this you may start an edit session and use a
spatial select (Vector>>Research Tools>>Select by location) and then use
the field calculator on the features attribute table to modify the
attribute values of the selected features.

Regards

On Tue, 22 Sep 2020 at 14:59, Mathias MIRRA <mmirra@mcgr.fr> wrote:

> Here is my problem: I have 3 layers only I would like to remove all the
> attributes that are not on layer 1, no table of layers will provide a
> foreign key or link. So delete the layer 2 and 3 attributes that are not on
> layer 1.
> 
> 
> 
> 
> 
> Screen : https://i.stack.imgur.com/nnOxd.png
> 
> 
> 
> 
> https://gis.stackexchange.com/questions/374754/delete-unnecessary-pyqgis-attributes?noredirect=1#comment612308_374754
>  
> 
> 
> *Mathias Mirra*
> 
> Développeur
> 
> 
> 
> Tel. : 06 29 70 41 92 | Mail. : mmirra@mcgr.fr
> 
> 
> 
> 281 Route d'Espagne,
> 
> 31100 Toulouse
> 
> 
> 
> 05 32 09 38 71 | www.mcgr.fr
> 
> 
> 
> <https://www.facebook.com/groupemcgr/>
> <https://fr.linkedin.com/company/groupemcgr>
> <https://www.youtube.com/channel/UCahBf8ogJuyGlzAczTTtC9w>
> 
> 
> 
> [image: Une image contenant plane, lumière, blanc, grand Description
> générée automatiquement]
> 
> 
> 
> 
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


[Attachment #7 (text/html)]

<div dir="ltr">Hi Mathias, this question seems more appropriate for the QGIS User \
group, so I&#39;m migrating the conversation there.<div><br></div><div>The \
description you&#39;ve given lacks enough detail for me to have a clear understanding \
of your intentions, so perhaps in the future you could provide a link to some sample \
data and more detail on your objectives so that others might be able to assist.  \
</div><div><br></div><div>From what I can gather from the discussion on stack \
overflow, you intend to  remove the attributes of all features on one layer that \
intersect another layer spatially. To do this you may start an edit session and use a \
spatial  select (Vector&gt;&gt;Research Tools&gt;&gt;Select by location) and then use \
the field calculator on the features attribute table to modify the attribute values \
of the selected features.</div><div><br></div><div>Regards</div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 22 Sep 2020 at 14:59, \
Mathias MIRRA &lt;<a href="mailto:mmirra@mcgr.fr">mmirra@mcgr.fr</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="FR">
<div class="gmail-m_-4722470526354301142WordSection1">
<p class="MsoNormal"><span \
style="font-size:11.5pt;font-family:Arial,sans-serif;color:rgb(36,39,41);background:rgb(249,248,246)">Here \
is my problem: I have 3 layers only I would like to remove all the attributes that \
are not on layer 1, no table of layers will provide a  foreign key or link. So delete \
the layer 2 and 3 attributes that are not on layer 1.<u></u><u></u></span></p> <p \
class="MsoNormal"><span \
style="font-size:11.5pt;font-family:Arial,sans-serif;color:rgb(36,39,41);background:rgb(249,248,246)"><u></u> \
<u></u></span></p> <p class="MsoNormal"><span \
style="font-size:11.5pt;font-family:Arial,sans-serif;color:rgb(36,39,41);background:rgb(249,248,246)"><u></u> \
<u></u></span></p> <p class="MsoNormal">Screen  : <a \
href="https://i.stack.imgur.com/nnOxd.png" \
target="_blank">https://i.stack.imgur.com/nnOxd.png</a><u></u><u></u></p> <p \
class="MsoNormal"><u></u>  <u></u></p> <p class="MsoNormal"><a \
href="https://gis.stackexchange.com/questions/374754/delete-unnecessary-pyqgis-attributes?noredirect=1#comment612308_374754" \
target="_blank">https://gis.stackexchange.com/questions/374754/delete-unnecessary-pyqgis-attributes?noredirect=1#comment612308_374754</a><u></u><u></u></p>
 <p class="MsoNormal"><u></u>  <u></u></p>
<p class="MsoNormal"><b><span \
style="font-size:12pt;font-family:Arial,sans-serif;color:rgb(78,135,160)">Mathias \
Mirra<u></u><u></u></span></b></p> <p class="MsoNormal"><span \
style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(78,135,160)">Développeur</span><span \
style="font-size:12pt;font-family:Arial,sans-serif;color:rgb(78,135,160)"><u></u><u></u></span></p>
 <p class="MsoNormal"><span \
style="font-size:5pt;font-family:Arial,sans-serif"><u></u>  <u></u></span></p> <p \
class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif">Tel. : 06 \
29 70 41 92 | Mail. : <a href="mailto:mmirra@mcgr.fr" target="_blank"><span \
style="color:rgb(5,99,193)">mmirra@mcgr.fr</span></a><u></u><u></u></span></p> <p \
class="MsoNormal"><span style="font-size:8pt;font-family:Arial,sans-serif"><u></u>  \
<u></u></span></p> <table border="0" cellspacing="0" cellpadding="0" width="379" \
style="width:284.4pt;border-collapse:collapse"> <tbody>
<tr style="height:60.7pt">
<td width="189" valign="top" \
style="width:141.8pt;border-top:none;border-bottom:none;border-left:none;border-right:1pt \
solid rgb(78,135,160);padding:0cm 5.4pt;height:60.7pt"> <p class="MsoNormal"><span \
lang="EN-US" style="font-size:12pt"><img border="0" width="177" height="74" \
style="width: 1.8437in; height: 0.7708in;" \
id="gmail-m_-4722470526354301142Image_x0020_1" \
src="cid:174b66aa97b4cff311"></span><span lang="EN-US" \
style="font-size:10pt;font-family:Arial,sans-serif"><u></u><u></u></span></p> </td>
<td width="190" valign="top" style="width:142.6pt;padding:0cm 5.4pt;height:60.7pt">
<p class="MsoNormal"><span lang="EN-US" \
style="font-size:9pt;font-family:Arial,sans-serif">281 Route d&#39;Espagne, \
<u></u><u></u></span></p> <p class="MsoNormal"><span lang="EN-US" \
style="font-size:9pt;font-family:Arial,sans-serif">31100 \
Toulouse<u></u><u></u></span></p> <p class="MsoNormal"><b><span lang="EN-US" \
style="font-size:3pt;font-family:Arial,sans-serif;color:rgb(47,84,150)"><u></u>  \
<u></u></span></b></p> <p class="MsoNormal"><span lang="EN-US" \
style="font-size:9pt;font-family:Arial,sans-serif">05 32 09 38 71 | </span><span \
lang="EN-US" style="font-size:12pt"><a href="http://www.mcgr.fr/" \
target="_blank"><span \
style="font-size:9pt;font-family:Arial,sans-serif;color:windowtext">www.mcgr.fr</span></a></span><span \
lang="EN-US" style="font-size:9pt;font-family:Arial,sans-serif"><u></u><u></u></span></p>
 <p class="MsoNormal"><span lang="EN-US" \
style="font-size:3pt;font-family:Arial,sans-serif"><u></u>  <u></u></span></p> <p \
class="MsoNormal"><span lang="EN-US" \
style="font-size:10pt;font-family:Arial,sans-serif">   </span><a \
href="https://www.facebook.com/groupemcgr/" target="_blank"><span lang="EN-US" \
style="font-size:12pt;color:windowtext;text-decoration:none"><img border="0" \
width="25" height="25" style="width: 0.2604in; height: 0.2604in;" \
id="gmail-m_-4722470526354301142Image_x0020_2" \
src="cid:174b66aa97b5b16b22"></span></a><span lang="EN-US" \
style="font-size:10pt;font-family:Arial,sans-serif">          </span><a \
href="https://fr.linkedin.com/company/groupemcgr" target="_blank"><span lang="EN-US" \
style="font-size:12pt;color:windowtext;text-decoration:none"><img border="0" \
width="25" height="25" style="width: 0.2604in; height: 0.2604in;" \
id="gmail-m_-4722470526354301142Image_x0020_3" \
src="cid:174b66aa97b692e333"></span></a><span lang="EN-US" \
style="font-size:10pt;font-family:Arial,sans-serif">          </span><a \
href="https://www.youtube.com/channel/UCahBf8ogJuyGlzAczTTtC9w" target="_blank"><span \
lang="EN-US" style="font-size:12pt;color:windowtext;text-decoration:none"><img \
border="0" width="25" height="25" style="width: 0.2604in; height: 0.2604in;" \
id="gmail-m_-4722470526354301142Image_x0020_4" \
src="cid:174b66aa97b7745b44"></span></a><span lang="EN-US" \
style="font-size:10pt;font-family:Arial,sans-serif"><u></u><u></u></span></p> </td>
</tr>
<tr style="height:6.2pt">
<td width="379" colspan="2" valign="top" style="width:284.4pt;padding:0cm \
5.4pt;height:6.2pt"> <p class="MsoNormal"><span lang="EN-US" \
style="font-size:3pt"><u></u>  <u></u></span></p> <p class="MsoNormal"><span \
lang="EN-US" style="font-size:12pt"><img border="0" width="365" height="26" \
style="width: 3.802in; height: 0.2708in;" \
id="gmail-m_-4722470526354301142Image_x0020_5" src="cid:174b66aa97b855d355" alt="Une \
image contenant plane, lumière, blanc, grand

Description générée automatiquement"></span><span lang="EN-US" \
style="font-size:9pt;font-family:Arial,sans-serif"><u></u><u></u></span></p> </td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span><u></u>  <u></u></span></p>
<p class="MsoNormal"><u></u>  <u></u></p>
</div>
</div>

_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" \
target="_blank">QGIS-Developer@lists.osgeo.org</a><br> List info: <a \
href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" \
                target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
                
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" \
rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote></div>



["image001.png" (image/png)]
["image002.png" (image/png)]
["image003.png" (image/png)]
["image004.png" (image/png)]
["image005.png" (image/png)]
[Attachment #13 (text/plain)]

_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic