0
votes
0answers
34 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() ...
0
votes
1answer
21 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
52 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
32 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 ...
1
vote
1answer
53 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
42 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
66 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
26 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 ...
1
vote
1answer
202 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
34 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
70 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
61 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
79 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
51 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
434 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 ...
2
votes
1answer
905 views

How to rename attribute's name of a field in a shape file 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
48 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
783 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
2answers
222 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
85 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
67 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
214 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
66 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
176 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
52 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
273 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
247 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 ...
0
votes
1answer
150 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 ...
3
votes
1answer
230 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
357 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
63 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
77 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
406 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
143 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
181 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
115 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
155 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
166 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
173 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 ...
1
vote
1answer
97 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
177 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
177 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 ...
0
votes
2answers
111 views

loading CanVec directory full of .shp files

I'm totally new to QGIS, and trying to view a Canadian Topo map as published on an iMac - I don't want to change it. ...
1
vote
2answers
101 views

Generating new shp files according to attribute in QGIS

I know that it is possible to color a vector map by attribute. I separated a map into 4 colors based on an attribute and now I want to generate a new map for each color. Is there a way to do this in ...
2
votes
1answer
48 views

How to make a certain attribute Toggelable? [duplicate]

I have imported data from an excel spreadsheet containing lat,long coordinates associated with other attributes such as current operator of each point (well). I imported as a tab delimited file, then ...
2
votes
3answers
1k views

Joining attributes of polygons and points by location in QGIS

I have two shapefiles.... points containing a number field 'response_time' a polygon grid of square polygons containing fields including 'PNTCNT' with the number of points per polygon, calculated ...
4
votes
1answer
1k views

What is the best way to connect spatial data with attributes in Excel table?

I have many attributes which are stored in an Excel table. They refer to USA counties. I need to somehow connect those attributes to polygons in some format (don't know which is the best) and ...
2
votes
2answers
116 views

What specifically is an 'attribute' and how does it work with the related chart?

I'm a new QGIS user (and GIS technology in general) and I'm trying to learn its fundamental features. I have a big dilemma about vector shapefiles, and points in particular: basically, I don't ...
2
votes
1answer
511 views

How to save WMS getFeatureInfo points to a layer?

This may be a poorly worded question, because I am not sure of the exact terminology, but I'll give it a shot. I have imported a vector layer from a WMS server into QGIS. I am able to query the ...
2
votes
3answers
885 views

Spatial join including attributes - kind of like right join

I've run in to a little problem. I have two sets of polygons with important attributes. I need to join over the attributes from the first set to the other, but I can't seem to figure out how. ...