[Qgis-user] Editing shapefile attributes in QGIS

Nicolas Cadieux nicolas.cadieux at archeotec.ca
Thu Dec 18 12:14:05 PST 2014


Hi,

First step is to learn how to do it in Qgis.   Between the Field 
Calculator (open an attribute table, last icon on the left) and the 
table manager pluging (that you need to download and install as a 
plugin) you can do everything.

If really really what to manipulate data in Excel, it's easy to do that 
if you have a shape file with points.  Just save as .csv and then import 
the text file in Excel.  You will need to know the projection (CRS) it 
is in.  You will have to column with x and y that you can then use to 
reimport back to QGIS.

If you have polygones or polylines, create a new column (ex RowNum) and, 
using the Field Calculator,  use the $rownum function to add a row 
number to each polygon.  Then, export your data to .csv.  Do the 
modifications in Excel and then reimport the .csv with no x and y 
specified.  You will have a table with no object.

Then, load the .shp and .csv in the same project and Join both tables 
(Layer property, Joins (in the .shp) use the RowNum to join both files 
together.  It you save the resulting file, the new.shp with have all the 
column included.  You may then need to eliminate some columns after.  
Use the table manager or the field calculator to do that.

Remember that Excel, depending on the version,  may not be able to 
manipulate all the lines. After 2010, it's a million lines I think but 
it will be painful.

Hope this helps.
Nicolas


Le 2014-12-18 14:38, David Bradley [via OSGeo.org] a écrit :
> Can someone point me in the direction of a better way to edit the data 
> in a shapefile?
>
> Basically I want to export what is already in there to Excel, edit it, 
> and then re-import it. The editing I need to do is to move a few cells 
> into another column, add several columns, and remove many other 
> seemingly superfluous columns.
>
> Thanks for any suggestions!
> David
> _______________________________________________
> Qgis-user mailing list
> [hidden email] </user/SendEmail.jtp?type=node&node=5178431&i=0>
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the 
> discussion below:
> http://osgeo-org.1560.x6.nabble.com/Editing-shapefile-attributes-in-QGIS-tp5178431.html 
>
> To start a new topic under Quantum GIS - User, email 
> ml-node+s1560n4125267h38 at n6.nabble.com
> To unsubscribe from Quantum GIS - User, click here 
> <http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4125267&code=bmljb2xhcy5jYWRpZXV4QGFyY2hlb3RlYy5jYXw0MTI1MjY3fDYzNDQ4MjQxNg==>.
> NAML 
> <http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> 
>





--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Editing-shapefile-attributes-in-QGIS-tp5178431p5178437.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20141218/31243980/attachment.html>


More information about the Qgis-user mailing list