0
votes
1answer
27 views

Delete empty attribute columns of a shapefile with QGIS or ogr2ogr

I have a shapefile with a lot of empty columns but many of them are empty. Using QGIS or ogr2ogr, how do I remove all attribute columns where everything is NULL?
1
vote
1answer
50 views

Syntax to add attributes in a line in the Expression String Builder

I have several columns with certain values, here's an example: | Apple | Banana| Orange | Pear | Expected result | 1 | 1 | 1 | 1 | red | 1 | 2 | 2 | 1 ...
2
votes
0answers
36 views

QGIS how to make unedited data?

I have a table in QGIS (using QGIS 2.4). I have created a form for adding attributes. When I add new objects on the layer, I also create it's attributes. Can I make attributes that I have added ...
3
votes
1answer
95 views

QGIS 2.4 Not Importing ExtendedData from Self-Exported KML

I've been scouring the internet for the past few hours, and I just can't seem to figure it out! Is it just me? I am using Quantum GIS 2.4.0-Chugiak. Here are my simple steps: 1) I create a new ...
2
votes
2answers
91 views

Auto populate field as concatenation of other fields

I'm searching for a way to automatically combine several field values entered in the feature edit dialogue, resulting in a new column comprised of the former values. I have, say fields A, B and C ...
0
votes
2answers
69 views

Using the Rule-based style to calculate each grid cell from overlaps

I am using the Rule-based styling properties (QGIS 2.2) to determine the colour of grid cells for a merged shapefile. Each grid cell defined by its ID may be overlapped by several layers as defined by ...
3
votes
1answer
108 views

QGIS - Is it possible to increase Output Field Name?

When creating a new Column, the default value for the length of the name is 10. Using the Field Calculator via the Model Builder, I want to include the names of regional areas into the columns which ...
0
votes
0answers
22 views

QGIS attribute action, open email client from Attribute table

I'm adding an QgsAttributeAction programmatically with the code below. actions = iface.activeLayer.actions() actions.addAction(QgsAction.OpenUrl, 'Email', 'mailto:[% "address" %]') Once added, I ...
0
votes
0answers
41 views

Problem reducing the width of the attributes fields of a shapefile using python

I have a shapefile with rather long attribute widths (which is resulting in a rather large file). I am trying to trim it in python, here is my code: layer = qgis.utils.iface.activeLayer() ...
1
vote
1answer
40 views

Expression to create and populate column based on filtered fields

I wanted to create a column and populate it with data based on data from other fields. If column_1 contains fields which has similar string (eg. field_1 = "Country: UK", field_2 = "Country: US", ...
1
vote
1answer
163 views

Adding attribute list to combobox in a python plugin

I am developing a simple plugin at the moment which contains 3 combo boxes: comboBox_1 comboBox_2 comboBox_3 Combobox 1 & 2 lists the vector layers available, however I would like the 3rd ...
0
votes
0answers
40 views

Why can't I save a line shapefile?

I'm working with qgis v. 2.0.1. I have some data points and I just wanted to create a new shapefile with line geometry. In the new vectorlayer-window, I added some attributes (approx. 10) and klicked ...
0
votes
1answer
70 views

How can I copy columns from layer 1 to layer 2?

I have two layers, the first layer is pipe: that has some fields (column) title like : length, id, material. Also I have another layer that is empty (without any fields). How can I copy fields ...
0
votes
1answer
65 views

Programmatically modify attributes for vector layer in QGIS

I am trying to programmatically modify attributes for a vector layer, using calculated values currently stocked in a dictionary. Any pointers on where i'm going wrong? my dictionary has the feature ...
3
votes
1answer
129 views

Batch map creation, iterated over attributes of a layer, in QGIS

I am using QGIS 2.0.1 under Mac OS-X 10.8.2. I have a layer of counties in New Mexico to which I have joined a csv file that includes presence / absence of plant species by county. I've set up the ...
0
votes
0answers
51 views

QGIS grabs incorrect field values for categorized style classification

as seen in the first image, the field values QGIS returns when I attempt a 'select by expression' are values found nowhere in the field in question ('FLD_ZONE'). Instead, it returns a selection of ...
0
votes
1answer
652 views

How to export QGIS contour attributes in a DXF file?

I'm new to this. I have a .tiff data file that generates contours in QGis. That's super. I save it as .dxf. The contours don't have any attributes or data. That's bad, because I want to make a 3D ...
3
votes
1answer
43 views

Input field not showing up in Distance Matrix In QGIS 2.0

I tried to perform a Distance Matrix analysis of building centroids. I have a two building centroid layers. The attributes in both the tables are name, osm_id, perimeter and area. In the Distance ...
5
votes
1answer
104 views

How can I get the field index of the new layer in my script using Python?

I am trying to use layer.changeAttributeValue(fid, fieldIndex, value) to add values to a field in QGIS Basically, I'm creating a plugin which will, if a checkbox is ticked, create a new field, then ...
0
votes
0answers
90 views

How to change Split Vector by Attribute to produce files with attribute values as file names?

Using: QGIS 2.0.1 I am trying to separate a large fauna point .shp file into many shapefiles based on each species' unique name attribute (i.e. by "SCI_NAME" field)??? I am currently using "Split ...
1
vote
1answer
156 views

Join Tables related by a composite primary key in qgis

I have two tables, one has the geometry and other has attributes. The table with geometry has unique number primary key, and 4 columns admin1,admin2,admin3,featureid. Table two is a csv file has the ...
0
votes
0answers
75 views

kml to shp including a field attribute as name/description (using 2.1.0 Durfour)

I have the Durfour version at my disposal. I captured some data in Google Earth, converted it to .shp, made some revision (e.g. added consecutive numbering) and would like to convert it back into ...
3
votes
1answer
1k views

Why can't I edit attribute table imported through 'text as layer'

I imported the coordinates from an Excel table. They show as single points as intended. Now I want to add columns to the attribute table, but I'm not able to edit it. I wanted to import the following ...
8
votes
1answer
3k views

How to rename attributes/fields in a shapefile attribute table?

I would like to rename some fields in my attribute table: Like rename XRF_N3in something else. It seems quite a easy issue but I don't find any information about how can I do that... I've QGIS 1.8 ...
2
votes
0answers
66 views

How to copy the contents of an attribute from one vector layer to another one that touches it or intersects it?

I have 2 layers that intersect, called layer A and layer B. Layer A has an attribute (X) that I want to copy wholesale (for the whole layer) to layer B, so that when object A1 intersects object B1, ...
1
vote
2answers
3k views

How to Merge/Dissolve Polygons By Common Attribute Field in QGIS?

I have joined corresponding Local Enterprise Partnerships table data into a polygon shape file containing UK Local Authorities. How do I Dissolve or Merge the the Local Authorities polygons by ...
1
vote
3answers
364 views

Join excel attributes to shape attribute

I am wondering if there is a way to join the attributes from excel tables to shapes in Qgis. I have abbreviations in the shape and want to add the associated complete names from excel file by ...
0
votes
1answer
109 views

Calculate attribute height of point data

I have an x (easting), y (northing) and z (height) values associated with my point shapefile. I would like to calculate the z values from the DTM I have - how do I do this in QGIS? I am fairly new ...
0
votes
1answer
77 views

How to convert polygons to centriods without losing attribute names?

I have a GeoJSON file of polygons and I need to convert it to centroids. Finding the centroid is very easy in QGIS. Problem My attribute names are very long and have a colon between them, e.g. ...
0
votes
0answers
403 views

Add new rows to a shapefile

I'm using QGIS. When I enable editing of a shapefile's table attributes and select, 'open attribute table,' is it possible to add new rows to the shapefile's table attributes? The problem I'm trying ...
3
votes
1answer
97 views

Field Value Mapping QGIS

I am wondering if there is a way to do field value maps that are filtered based on another attribute field? I know how to associate value maps, but not that are connected to another field. I have ...
2
votes
2answers
286 views

Is the derived area/length/xy values of a polygon/polyline layer in QGIS usable?

I have a raster that is projected to a state plane CRS and I am adding polygon/polyline shapefiles that are projected to WGS84. On the fly transformation is set to reproject to my raster CRS. When I ...
0
votes
1answer
60 views

Value Map Attributes to Multiple Files in QGIS

I am hoping someone can share a way that I can some what automatically (none manual) associate a pre-defined CSV file for use with multiple shapefiles as an attribute Value Map. I have a number (in ...
0
votes
2answers
337 views

How join attributes for point feature from nearest points in road network

I have two layers: 'linear' - road network and 'point' - points in each linear features intersections. Point layer have in attribute table name for each point features: A,B,C,D,E,F, etc. How add in ...
2
votes
2answers
472 views

Merge lines with the same 'name' attribute on QGIS?

I have a shapefile with a few thousand lines, each is a street segment. I'd like to merge all features with the same 'streetName' attribute into a single attribute. I only really care about the name ...
1
vote
1answer
235 views

Connect not working for custom QGIS form

So I have a custom form for editting feature attributes. However, I can't seem to correctly disconnect and reconnect certain bindings. The init code is below and should work for any simple QT widget ...
5
votes
1answer
454 views

How to programmatically associate a layer with a custom UI?

I know it is possible to associate a layer with a custom UI for editing feature attributes using the QGIS interface. But is this possible with Python? This link shows how to achieve the result ...
5
votes
2answers
425 views

Clip polygons with other polygons based on matching attributes

I have two shapefiles, one which contains event locations and the the other of which represents regions where events take place. Events polygons with year and region_name attributes Regions ...
1
vote
1answer
80 views

Stop custom attribute form from resizing in Qgis

When I open a custom attribute form for a feature in Qgis it always gets resized to the default size of the original Qgis attribute form. I've tried to set the sizePolicy in QT Designer to Fixed ...
0
votes
1answer
96 views

Custom forms and location of python code

I'm working with custom forms for the attribute table of various qgis-object and it works realy well, but I would like to have my forms and their python files separated from the projects. This is not ...
3
votes
1answer
644 views

How to add CSV data with no coordinates to a polygon layer in QGIS?

I would like to add attributes from an spss database (around 300 cases) to a polygon layer in QGIS. Both datasets have a column with unique IDs. I exported the spss data to a CSV file which does not ...
0
votes
4answers
153 views

How can I calculate different polygons by different attributes?

I'm doing my master thesis and want to calculate different polygons (in QGIS 1.8 for Mac) in four different columns which I defined by different attributes. i.e. some of the attributes in the first ...
2
votes
0answers
205 views

Divide polygon layer by point layer in QGIS?

I have two layers - one polygon layer that is a buffer of a road layer, and one point layer that shows certain locations along that road. What I want to do is to divide/split the polygon layer at the ...
0
votes
0answers
141 views

Why do my Attribute table joins result in all NULL?

I spent hours getting "null" results in joining a downloaded state and county shp file to a self-created file (SCF). What I found was that the SCF had to have "EXACTLY" the same set of names/ID#'s as ...
0
votes
0answers
206 views

Display colour coded road traffic data in QGIS

I would like to colour code a shape file containing road polylines to represent the heaviest flows of traffic. The shape file contains attribute data linked to each section of road where road traffic ...
2
votes
1answer
236 views

Merge attribute data using spatial query in QGIS

I have 2 vector layers that I wish to correlate attributes - a shape file containing boundary polygons and a shape file containing point locations. I'm using the vector>spatial query tool to generate ...
2
votes
2answers
222 views

Capitalizing The First Letter Of Each Word In Attribute Field

Does anyone know of a way to capitalize the first letter of each word in a field in an attribute table? I am doing this in QGIS. I know of field calculations to change all the words to Lower or ...
2
votes
1answer
106 views

Join attributes by date in Qgis

I learned (thanks!) to use the join feature built into the layer properties, but in my case it doesn't work because data do not match perfectly. Infact shape refers to geotagged photos, csv is a log ...
1
vote
1answer
198 views

How do you parse an HTML formatted attribute value to seperate columns in a database table?

All, I have an attribute field formatted using HTML all ready to go for google earth markers. The KML in question is here: http://dl.dropbox.com/u/95231813/state_pts_MI.kml Here is the value: ...
3
votes
2answers
228 views

How to create a label formatted like “ 1,000' ” from a numeric field?

This question builds on a previous question I came across at gis.stackexchange: How to easily edit attribute data using Regular Expressions? Perhaps someone can point me in the right direction? I ...