A command used to retrieve information from a database

learn more… | top users | synonyms

0
votes
0answers
9 views

MongoDB $geointersecting big polygons!

I'm using mongo to store some geolocalized data, with the goal of retriving them using $geointersect. Specifically I have this document stored in my db: { "loc": { "geometry": { "...
2
votes
1answer
40 views

Default PostGIS type of geometry in SELECT

Is there an option in PostGIS (in query or table option) to set the return type of a Geometry? I'm using this query: select * from "locations" where "locations"."id" = 2 limit 1 And that will ...
0
votes
0answers
32 views

QGIS Custom Query Plugin

I am very new to QGIS plugin development. Is it possible to create a custom form (Field will be fixed and User can select only operator and enter value for field) to do custom attribute expression ...
1
vote
2answers
90 views

SQL query new feature with loop

I'm trying to create an individual buffer feature class for each column of an input feature class, where there is a field that contains the buffer distance. I think there is a problem with my SQL ...
0
votes
1answer
201 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" href="http://libs.cartocdn.com/...
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 ...
0
votes
2answers
203 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 ...
0
votes
0answers
20 views

line_locate_point: 1st arg isnt a line

i used this query for routing procedure SELECT pgr_nodeNetwork('edges', .006); I am following this workshop http://workshops.boundlessgeo.com/tutorial-routing/ and this is the error, I can't ...
2
votes
0answers
37 views

select living-end-streets from a local osm-road-extract with QGIS

I am looking for a method or query to select living-end-streets from a local osm-road-extract. Living-end-streets are dead-end-streets for cars but cyclists and pedestrians can continue on their way. ...
1
vote
1answer
192 views

Select ID by most recent date

I have a personal GDB table that has a non-unique SLID field and a date field. Basically there are multiple records with the same SLID numbers but different dates. I want to select only the most ...
12
votes
6answers
5k views

Identifying duplicate attributes in field using QGIS?

I have a point shapefile with thousands of points. It has an ID code field that is supposed to be unique. Every now and then the data entry clerk wrongly type the ID creating duplicates. Right now I'm ...
1
vote
1answer
19 views

How to update a line attribute in PostGIS using an attribute from the polygon in which it is contained?

I have a road dataset which I want to update using the speed information from the state polygon in which it's contained. for all roads (line) within a state (polygon) if the road speed is null road ...
2
votes
1answer
51 views

Query over all layers in a mxd Arcpy

A newbie to python here. Ive been trying to query all layers on a mxd and have sucessfully implemented a script by advice on here. What I need to do now is to firstly make the query a parameter that ...
1
vote
1answer
39 views

Speed up spatial query on large table on psql

How to speed up spatial query on large table of bytea. I tried the suggestion from this website to create an index using b-tree GIST but the index is exceed the maximum size of 8191. Any ...
0
votes
0answers
31 views

Postgis Database: How can I get all gps points between specified timestamps and specified region?

I am totally new to DBMS. I have traces of vehicles in different csv files for each user. Format: name,timestamp,latitude,longitude. 1) How to implement RANGE Query which asks for all the gps points ...
0
votes
1answer
23 views

PostGIS query with external bounding box

I am editing a shapefile as wide as an island. The data are stored in a Postgres/PostGIS database. I want to display only features from my defined bounding box. The bounding box itself is a custom ...
6
votes
2answers
247 views

ESRI Javascript FeatureLayer Select by Attributes

I am trying to select a group of features in an ESRI javascript API featureLayer by attribute. The call errors out. My code is as follows. Here is the layer definition: var fieldDefs = [{ ...
3
votes
1answer
79 views

PostGIS crosstab on multiple point tables

I have several point tabels, lets say 3. Tables are alike with two columns: a integer value and a geometry like: table sand1 (value int, geom geometry) table sand2 (value int, geom geometry) table ...
2
votes
1answer
55 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 ...
1
vote
0answers
12 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
35 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
50 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
50 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
967 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 "Operator'...
1
vote
3answers
395 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
33 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
27 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
225 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
29 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
43 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
24 views
1
vote
0answers
25 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
50 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
32 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 MNPC">upper(...
3
votes
1answer
214 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
63 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
60 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
28 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
176 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
5k 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
90 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
237 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
70 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 PUBLIC....
1
vote
2answers
50 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 ...