2
votes
2answers
35 views

Parse Field to Select Records

I wish to select records based on the NRN attribute in my dataset : "NRN" IN ('1','2','23','31') Some records have multiple values in the NRN field separated by the underscore character. For ...
1
vote
1answer
38 views

QGIS Filters and Queries

In QGIS is there a way to filter a layer using the Query Builder to show all values which include a particular phrase. For example I have a list of organisations and I want to filter all those which ...
3
votes
1answer
65 views

Is it possible to use comments in QGIS Query Builder?

I am trying different queries in the Query Builder. Is there a way to comment the query? I tried with /* */ # -- without success : An error occurred when executing the query. The data ...
0
votes
1answer
33 views

PostGIS Group By Error [closed]

I am performing a pretty simple query in PostGIS 2.1.1 from within QGIS 2.2 for Windows (using the DB Manager plugin). I have a table with many columns and I am trying to perform a Group By function. ...
0
votes
0answers
82 views

Clipping multiple layers in QGIS 2.2

I have huge amounts of data (multiple country-wide shapefiles) which i have to work with constantly. But working on separate cases i only need a fraction of that data (region, city etc.) Loading the ...
0
votes
1answer
99 views

query / filter on attribute tables with external tables joined

i tried to do some queries on joiend table fields ... i've got/found some answers concerning version 1.8 - which result in "use select + export to create a combined dataset" so i just did some tests ...
14
votes
1answer
346 views

How to query OSM for all beaches facing west? - QGIS preferred

I want to identify all beaches on this planet (or a given subset of it) that are facing westwards (+/- 20-30 degrees). My idea is to use OSM as the data source. Extracting all polygons that have the ...
0
votes
1answer
70 views

Is it possible to do a query to multiple tables?

I have a point a line and a polygon layer. They have the same attribute table. Can I do one query that refers to all the attribute tables? So I wouldn't have to do every query three times. Thanks. ...
1
vote
2answers
130 views

Using Qt Designer to Create a Form in QGIS that can search for a specific point in a layer

Good Day! I would like to ask if you can create a form in Qt Designer to create a form that can search for a point on the map using data that the user will provide such as the Name. I am currently ...
0
votes
0answers
36 views

display route from database(postgresql) on

For first part: Link i have postgresql9.1,postgis2,pgrouting2 and qgis2.2 this is the second part of what i need to do: Search in a database (postgresql with pgrouting) for a line from public ...
0
votes
0answers
58 views

QGIS spatial query cryptic error message

I tried running a spatial query plugin to return features in SpatialLite layer that fall within selected feature on MapInfo .TAB layer, which worked fine, selecting 3 items. But when I tried creating ...
1
vote
1answer
263 views

Select by SQL in QGIS Python

In the GUI there is the Query Builder, but that does not seem to be easily available in Python. The processing (SEXTANTE) module has the qgis:selectbyattribute algorithm, but that only supports ...
1
vote
1answer
44 views

Is it possible to extract many municipalities out of a state map at once?

Is it possible to extract many municipalities out of a state map at once? I mean not to have to do the QUERY for each and one of them? Thanks in advance.
0
votes
2answers
75 views

How to find polygons with area size between 300 and 500?

I have bunch of polyygons, all with different area-size. I want to find polygons with areasize between 300-500. Normally I would pick out everyone above 300 (query1) and then commit a new query on ...
1
vote
1answer
94 views

How to solve 'syntax error, unexpected LE' in QGIS query builder?

I have a very simple question about the advanced query builder in QGIS. I'd like to search for a range of numerical data values in the attribute table, but asking QGIS to show me values that are ...
3
votes
2answers
455 views

How to group and count attribute data?

I have a problem with group same data to count it. for example, i want to group same code to one and count them. i can do it when i use MapInfo (Pic 1) but i can't in QGIS. (Pic 2: i can classify ...
1
vote
3answers
128 views

How to search for several different features in the attribute table?

I guess my problem is a quite simple one, but the query builder and I have our difficulties, so maybe someone can help me. I have a long attribute table in QGIS and am trying to extract about 200 ...
1
vote
1answer
74 views

Counting and sum by two layers

I´ve got to layers, both polygons. Layer 1 consists of propertiers, where ID is individually names. Layer 2 consists of lakes. The query I want is: Total count of squaremeters of lakes for each ...
2
votes
2answers
444 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
26 views

Why do I suddenly get 'ERROR' as elements in my attribute table after doing a query in QGIS?

I was looking at an .osm file in QGIS using the OSM plugin; I was specifically looking at a country's lines layer. When I checked the attribute table just after opening the .osm, everything looked ...
1
vote
2answers
60 views

Find the majority area within another area

I have a survey grid overlaid unto several administrative areas. Both are polygon features and I have performed a union on both features in order to determine the areal contribution of the segments ...
0
votes
1answer
76 views

How to select all cities in Germany from city and country layer?

I have 2 layers: layer_1: countries of europe, layer_2: cities of europe I want to create (and then save) a layer_3 which would be all the cities of Germany. Is there any good tutorial of how can i ...
1
vote
1answer
67 views

For each polygon, return yes/no value if it intersects another layer

I have a polygon grid overlaying several other polygon vectors. I wish to visit each polygon in the grid and ask yes/no if each of these layers fall within the grid cell or not. I can do this easily ...
2
votes
1answer
230 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 ...
3
votes
1answer
134 views

Filter contour lines in QGIS

I have a shapefile of contour lines, with an ALTITUDE attribute with the height ASL in metres. The source data is in 0.5m intervals, but I'd like to filter it down so I get contour lines at (for eg.) ...
1
vote
1answer
192 views

How can I change SQL query through a layer of an action (python)?

I have three layers from three diferent database tables. When I click in other layer I want to change (with an action) the query of that three layers. How can I do that? Thank you
0
votes
1answer
110 views

In QGIS can I show just the lines in a Postgis query? How can I do that?

I have three tables in Postgresql, each table with one layer of lines. I want to show the path of an initial line to another final. Is it possible executing a SQL query? Thanks My three tables are ...
2
votes
2answers
315 views

Selecting lines occupying identical positions in MapInfo or QGIS

I have two shapefiles from a client, one is their entire network (complete with unique IDs) and another a selection I need. However the selection file does not have unique IDs but the entire one does. ...
2
votes
1answer
145 views

How to best execute the same query on many different vector layers?

I have some vector layers in my project and I need to separate the polygones by area (I need a copy of all shapes > 2ha). I know how to do this for each separate layer (query) but is the a tool to do ...
5
votes
2answers
1k views

How do I use QGIS python console to iterate through simple layer queries and png outputs?

I'm really new to QGIS coding and I'm having a hard time finding (especially) the api classes/functions to carry out actions of the Query Builder window. I'm basically trying to do this: Iterate ...
3
votes
1answer
224 views

How to filter layer of osm data?

I have a table osm_roads that has a column named geometry geometry geometry(LineString,900913). If I want to filter a city to draw districts, I cannot do it by geographic coordinates? What if in ...
2
votes
1answer
602 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 ...
13
votes
3answers
3k views

Idiots guide to expressions for QGIS

I have no formal training in GIS and have learned on the fly with ArcGIS 9.3 at work and have been dabbling with QGIS on my own time for my business. Is there any resource recommendations ingeneral ...
5
votes
1answer
505 views

How to run custom queries on vector layers and display results?

Is there a way to display the result of a query in QGIS? For instance : To get the total number of inhabitants : SELECT SUM( inhabitants ) FROM countries To get the total density : SELECT ...
4
votes
2answers
647 views

Spatial query of raster data

I have population distribution data as a raster layer and exposure contours as vector (polygon) layers. What I'd like to do is use the vector layer to estimate the population indicated from the raster ...
7
votes
2answers
283 views

How to run a spatial query with a raster and vector layer in QGIS?

I have a soil map (vector-polygon layer) and a map of the crops farmed in the same area (raster layer, from the US Cropland Data Layer). I would like to calculate for a given soil type, the surface ...
3
votes
3answers
1k views

How to join Shapefile and Excel data without unique ID column?

I have one huge shapefile with lots of roads (polylines) along with various attributes and I have an Excel file containing some of these roads by three same attributes (road no., section no., length) ...
2
votes
1answer
655 views

How to query attributes cross-table in QGIS?

is it possible in QGIS to query a layer with data from another layer? And if so ... how is the syntax for that? Usecase: I have a lot of image-position points and a lot of monitoring sites. I would ...
10
votes
5answers
2k views

How to identify duplicate attributes in a field?

I have a point shapefile with thousand of points. It has an ID code field that supposed to be unique. Every now and then the data entry clerk wrongly type the id creating duplicates.Right now I'm ...
3
votes
1answer
2k views

How to filter features in a layer?

I am trying to display certain features in a shapefile-based layer using QGIS. I have found the subset function in the properties panel, which does exactly what i want, but is too tedious given that I ...
2
votes
1answer
760 views

Why does my PostGIS query fail with “current transaction is aborted”

I'm trying to create a vector layer in a QGIS project using a PostGIS query. QGIS is returning the following error: Query failed 1 cursor states lost. SQL: CLOSE qgisf1 Result: 7 (ERROR: ...
2
votes
1answer
316 views

How to query OSM tags by polygon?

I do not know whether something like this is possible but nonetheless. If I understand OSM correctly all objects essentially have associated tags based on type of object (street, building etc) ... ...
9
votes
2answers
2k views

How to select features with NULL attributes in QGIS?

I need to identify which features have null attributes in the attribute table of a shapefile. When i try [field]= 'NULL' it selects the features with value=0 (see picture) Suggestions?
11
votes
1answer
554 views

Nearest Neighbor Grouped Selection in QGIS

OK - so I have an interesting problem I am trying to solve. I have a list containing over 100,000 points in lat/long format which I have imported into qgis. Now, what I am trying to do here is group ...
0
votes
2answers
1k views

QGis import partial PostGIS layer using query builder

I'm sorry, but I'm terribly new to the GIS scene (and PostGIS & QGis). I have loaded a whole bunch of OpenStreetMap data into a PostGIS database and successfully drawn a map using Mapnik. Now I ...