A command used to retrieve information from a database

learn more… | top users | synonyms

0
votes
1answer
194 views

Get CartoDB query by distance to work

Has anyone tried this tutorial: Query by distance ? This is a copy of the final code which they use for the map: <html> <head> <link rel="stylesheet" ...
2
votes
1answer
45 views

Using function to query text field in ArcGIS Select By Attributes?

I can do this: And get result: On the other hand, when I do this: I get an error message: Why query using function is working on numeric field and is not working on text in both shapefile ...
0
votes
2answers
193 views

Performing spatial join in Spatialite (QspatiaLite for QGIS)

I'm trying to spatially join and summarize the attributes of a set of buildings to a set of containing parcels. There are (potentially) many buildings to each one parcel. Here is the query as I'm ...
1
vote
0answers
11 views

Wfs altimetric curves that intersect geometry?

I have a wfs with altimetric curves and i would like to perform a spatial query, i would like to load from wfs only curves that intersect or overlaps a geometry from a shp,so only curves of a specific ...
4
votes
1answer
29 views

Filter a range number in Query Builder of QGIS 2.8.6

I need to filter features that have attributes that start within a relative number range. I am using brackets to filter the range of numbers, but it does not work me. This is my query: CASE WHEN ...
4
votes
1answer
43 views

Change entire label style after certain extent

I need to design a dynamic label in ArcMap that changes its entire style after a certain zoom extent. The research I've done suggests to me that there is currently no way to use VBscript to manipulate ...
1
vote
1answer
32 views

Recurring SQL Expression Parsing Error on Query Builder

I am using Query Builder in QGIS 2.14.2-Essen to select one country (Peru) among 237 for which to show two layers (states_provinces, boundary lines) from the Natural Earth database. I am paying close ...
7
votes
2answers
780 views

QGIS Filtering Multiple Values using Query Builder

In the "Query Builder" I can currently filter on value from the "Values List", but I'd like to be able to filter for multiple values at once. How can I go about doing this using the SQL and ...
0
votes
1answer
1k views

SQL Geometry Query similar to Select by Centroid

Does anyone know if it's possible to query SQL geometry by something like 'centroid of polygon'...similar to ArcMap's select by location? I'm using SQL Server 2008 R2 as the DBMS. I have two polygon ...
1
vote
3answers
342 views

Extracting difference between two massive shapefiles using QGIS?

I have two massive shapefiles and I need to create a difference shapefile output between the two. I have a layer where I have satellite coverage (orange) and then a layer where I have high resolution ...
0
votes
2answers
31 views

Proper handling in PostgreSQL/PostGIS only after many queries?

I am trying to analyze GPS data of a parade on a fixed route with a certain variance due to the urban surrounding (canyoning). I'd like to project the GPS waypoints to the nearest points on the route ...
1
vote
0answers
22 views

How to pass time dimension to postgis DB layer WHERE clause in Geoserver?

I have successfully configured a layer with time dimension that is backed by an SQL query to a PostGIS DB. I can query it through WMS, but I just can't find a way to pass the start and end time to the ...
0
votes
1answer
183 views

Selecting features by attribute in Leaflet

Is there a way to select an individual feature based on an attribute from a FeatureGroup in Leaflet? For example, when selecting a feature based on a click event, I will do something like, function ...
1
vote
0answers
21 views

How to get all pixel values of raster within a GeoJSON FeatureCollection in PostGIS

I need to extract all pixel values in a raster within a GeoJSON mask, using ST_Intersects. Attempt (throws invalid GeoJson representation): select row_to_json(t) from (select * from table_name where ...
3
votes
2answers
42 views

Search for textbits in QGIS

Is there a way to search for only parts of text in QGIS. Imagine I have a field in my attributetable called myField and I have several entries there, something like This is awesome Even more awesome ...
1
vote
1answer
23 views
1
vote
0answers
24 views

Selecting cells with values from DEM those are above specific value corresponding to each polygon?

i have a shapefile with 2000 polygons and a DEM. i want to calculate zonal mean for each polygon considering values from DEM which are above a particular value for each polygon. i want to it with ...
1
vote
2answers
45 views

How to specify two different and separate conditions in query builder?

For example, I have a table containing well log data for multiple operable units. I would like to make a query outputting a table where Operable unit=001 OR 002, AND Formation= Residuum. I would ...
0
votes
1answer
27 views

Search widget expression

I am trying to migrate my Flex eSearch widget to the CMV Search widget. The query is not working. What can I do to make it work? Flex query: <value prompt="Example: MN or ...
3
votes
1answer
209 views

Selecting limited TOP n from specific column in ArcGIS query builder?

I'd like to know what is the best way to select a limited top 'n' of rows from a specific column of a geodatabase file. Currently I use a function in the query builder of the select tool (arcgis10) in ...
2
votes
1answer
55 views

Changing Query Layer's SQL Expression with Python

I use query layers in ArcMap 10.4. The maps need to be done/repeated periodically. The easiest way is to copy the map, change the source's SQL expression (e.g. from select * from TABLE where Period = ...
0
votes
0answers
32 views

How can I determine an appropriate query based on a join?

I am having trouble coming up with a query that will show the 12 states total population percentage in ArcMap 10.4. I created the spreadsheet below and I have already joined my excel to the states ...
1
vote
2answers
54 views

Calculate area parts of polygon intersections

I have a problem of calculating area sizes of intersected polygons in postgis. I would represent the problem in an example (please see the picture). I have a gridsquare table with some attributes like ...
3
votes
1answer
23 views

QGIS: Error message in query builder

I am using QGIS version 2.14.1 (Essen) and trying to update data in my table using field calculator. I am inputing the following statement: update "table_1" set "table_1" ='y' where "table_2" ...
2
votes
2answers
165 views

QGIS keyboard shortcut to launch a 'Select by expression' query

I can't find if it is possible to launch a 'Select by expression' query (not to open the dialog) with a keyboard shortcut. I can't find this option in the Settings > Configure shortcuts list... If ...
0
votes
0answers
13 views

How can I create a definition query to show the next 5 years of data, based on a text field with the year on a joined table in SDE?

I need to show the next 5 years of construction data, but I want it to automatically update what is shown based on a text field called ConYearStartNbr that shows when the construction is set to start ...
3
votes
4answers
4k 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 ...
4
votes
1answer
1k views

PostGIS intersection function

I have a problem with intersection function. I built my query following http://manual.linfiniti.com/en/postgis/geometry.html, 5.7 section. I made my clip object, a red linestring frame: But after ...
1
vote
1answer
1k views

How to make Stored Queries for WFS 2.0.0 in Geoserver

I am a new user of Geoserver. I have created a WFS and also could connect it with the QGIS WFS 2.0.0 Client plugin available now. But as like the default WFS link in that plugin I am not able to make ...
2
votes
1answer
83 views

SQL / Select by Attributes query for “does not include text found in another specified field”

I'm using ArcMap 10.2 and I'd like to write a query to select features where Field A does not include text found in Field B. Specifically, Field A contains street numbers and street names. Field B ...
3
votes
2answers
172 views

Selecting more than 1,000 features from AGOL hosted feature service?

When data from a cloud-hosted feature service is loaded into ArcMap, it queries the first 1,000 features "to enhance performance"... I, however, need to see all the features. How can I add all ...
0
votes
0answers
44 views

Accessing array of x,y coordinates stored as MDSYS.SDO_GEOMETRY / PUBLIC.SDO_GEOMETRY attribute in Oracle 11g?

I am totally new to GIS. I am working with a table in an Oracle 11g database. In each row of this table there are two attributes of interest: one is of type MDSYS.SDO_GEOMETRY and the other ...
1
vote
2answers
46 views

Using PostGIS to query shape files

I am very new to PostGIS (started using it this morning). My goal is to determine if a lat/long point is contained inside a polygon that is described in a shape file (The shape file has a single ...
2
votes
1answer
397 views

Querying OpenStreetMap tags by polygon using QGIS?

If I understand OpenStreetMap (OSM) correctly, all objects essentially have associated tags based on type of object (street, building etc) ... Can I use QGIS to obtain the statistics of different ...
0
votes
1answer
42 views

how to skip creating an empty feature class using featureclass to featureclass in arcpy

I have a script that finds points outside of selected areas and creates a feature class in a file geodatabase. However, sometimes there are no points outside of the selected area. Currently, the ...
1
vote
1answer
43 views

Use spatial queries on multiple layers in QGIS

Is there a way to perform spatial queries on multiple layers in QGIS without going through an external database? I would like to perform SQL-like queries on layers imported in QGIS directly, but can't ...
1
vote
0answers
25 views

Testing Oracle query produces valid results in QGIS Python Console

I have a query that searches an Oracle database using a where clause to get the geometry of an object and then zooms to the extent of that object. The value for the where clause is retrieved from a ...
0
votes
1answer
229 views

Summarizing at Modelbuilder

I like to summarize of the ID-Field with the ModelBulider because in the end I have to build a tool. The problem I have is that the field “GRIDCODE” should get in the new table comma separate. So that ...
1
vote
2answers
70 views

How to add state polygon information to a city point?

I have the following layers: Country border federal state borders cities (located as points) I would need the following result file (txt or csv..): A column with the name of the city and another ...
5
votes
1answer
182 views

How to build a query/expression to select specific points within a buffer? (in QGIS)

I have a point layer in QGIS. Each point represents a tree and each tree has information about its height as an attribute. I would like to build a query/expression to select all those trees that have ...
5
votes
2answers
1k 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 ...
3
votes
1answer
849 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 ...
1
vote
1answer
61 views

query.where statement using date range in JS API fails with IE 11 but works fine with Chrome and Firefox

My aim to display point data from a feature layer on ArcGIS for JS map interface. I am successful doing so in Chrome and Firefox, however when I include date in a where condition of a query execute it ...
3
votes
1answer
6k views

Exporting query to identify what polygon certain points fall in using ArcGIS Desktop?

I'm using ArcGIS Desktop 10. I have shapefiles consisting of points (street addresses). I also have shapefiles consisting of polygons (ie, congressional districts, city council districts, etc... a ...
2
votes
2answers
201 views

Can't import certain tables from SQL Server to QGIS

This is a list of 193 zip codes and their geometries that do not import in QGIS. This is a list of 999 Census Block Groups and their geometries that do import in QGIS. This is the Add MSSQL Layer ...
1
vote
1answer
1k views

How to query all layers in ArcMap and get access to them by name or index?

I have ArcMap with tons of layers. Some of these layers may contain another layers with data (aka Composite layers) or they don't. The depth of composite layers in unknown. I need to query all layer ...
3
votes
1answer
224 views

How to build a query tool for spatialite data in QGIS?

I am trying to build some tool for a collegue of mine to query data from a spatialite database while clicking on vector features. My first guess is, that I could do this with an "action" I define for ...
3
votes
1answer
112 views

Distance in meters between two geographic coordinates

I want to determine the distance in meters between two geographic coordinates. The points are: Lat (deg) Lon (deg) A: -33.3930906 -70.5452765 B: -33.3993212 -70.5468767 So if i calc the ...
0
votes
1answer
60 views

Arc 10.2.2 crashes when adding query layer?

I'm trying to add a query layer from an Oracle database into a blank 10.2.2. map. I enter the query, validate, finish, and the software thinks for a second and then just winks out. No error ...
1
vote
0answers
36 views

Overpass output city name instead of coordinates?

I did a query to look for certain things. However it only outputs the lat and long coordinates, there is no city data available. I'd like to have the city it belongs to / closest city though. I know ...