A command used to retrieve information from a database

learn more… | top users | synonyms

1
vote
1answer
64 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 ...
0
votes
0answers
18 views

When doing intersect columns are doubled in QGIS?

I am using QGIS version 2.14.1 (Essen). I am the spatial quieries (intersect function). When I do this, I save the new shapefile but it seems that in the new shapefile, the columns have been ...
0
votes
1answer
25 views

QGIS select points within certain radius

I've seen other threads ask very similar questions, but I haven't seen one that answers this specifically: So, I have 4 Total sets of points. 1 set is a set of addresses in Arkansas, the other 3 are ...
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
1answer
212 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 ...
0
votes
1answer
47 views

Drawing Queried Geometry using ArcGIS API for JavaScript?

I am new to all of coding and I have a rest point with all of my park polygons, what I want to do is be able to select a park name from a drop down menu and query out and display the single park ...
1
vote
0answers
20 views

How to query breadwinning mothers in IPUMS USA microdata?

Overall goal: Map rates of breadwinning mothers throughout South Carolina. I haven't been able to find exactly what I need in American Factfinder. I am looking for something that comes close to what ...
1
vote
2answers
99 views

how to set up a querystring for a mapserver layer?

I am trying to query a mapserver layer via url, but I am having trouble finding syntax examples. I want to use the indexquery mode and found this documentation http://gislars.github.io/mapserver_docs/...
0
votes
1answer
30 views

OSM: Getting the correct Overpass Turbo query using a keyword (and values)

I'm completely new to Overpass queries for getting OSM data, so sorry for this maybe trivial question. I'm looking for the correct query using Overpass turbo. I have found some demo queries, but I am ...
1
vote
0answers
34 views

Leaflet map with 'query of features' on mouseover and multiple layers

I have produced two working Leaflet maps that in total contain the features that I need for my application. However, I cannot solve how to have multiple 'overlay' layers that can be queried with ...
2
votes
1answer
66 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. ...
0
votes
0answers
18 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
42 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
205 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
2answers
215 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
24 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 ...
13
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
21 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
53 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
46 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
33 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
25 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
286 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
84 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
63 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
38 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
53 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
62 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
1k 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
446 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
30 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
265 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
34 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
45 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
25 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
35 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
217 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
80 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
63 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
33 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
180 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
16 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 ...