Questions tagged [query]
A command used to retrieve information from a database
692
questions
1
vote
0
answers
639
views
Query data within KML
Bing Maps v8 will not load multiple or complex KML files and allow me to query data within these shapes. Is there a work around for this?
1
vote
0
answers
149
views
Blank map in result page using MapServer
I am using MapServer to retrieve the data into my map but I get only a blank page instead of data on the map.
I am using the below query to fetch the data from a PostgreSQL:
DATA "the_geom from aoi ...
11
votes
3
answers
6k
views
Selecting only Spatial tables from PostgreSQL database?
My database contains both Spatial and Non-Spatial tables, but I want to retrieve only Spatial table from the query.
Any suggestions to select only Spatial tables. 'the_geom' is the geometry column in ...
0
votes
1
answer
140
views
How do I query two columns in CartoDB?
I'm making a simple map with locations of daycare centers plotted. I have two filters, one that shows ages and another that shows different types of centers. I can filter one one or the other, but not ...
1
vote
0
answers
20
views
Assigning one UNITID to multiple areas
I have a city wide water distribution network that will undergo a flushing process over the next couple of years. I need to keep track of what segments of pipe have been flushed. The work is divided ...
1
vote
2
answers
313
views
How to export query result on raster table in PostGIS
I did success query on a raster table in PostGIS (raster data clipped by a vector polygon), now I want to view the query result in QGIS. But how to export the query result to another table. In vector ...
1
vote
1
answer
305
views
copy value if an attribute comparison match with another layers attribute is found in PyQGIS
Unfortunately, the two layers don't cover the same size of area and therefore don't have the same number of attributes. That's the reason I only saw the following attempt, instead of simply zip them. ...
1
vote
0
answers
84
views
Query on all layer features with boundlessgeo sdk
I'm currently implementing a webgis by using the reactjs components from the boundlessgeo sdk.
I'm using the QueryBuilder component in order to query for features but It always performs the query on ...
2
votes
0
answers
404
views
Export Query Layer does not return all values [closed]
When I create a query layer, the attribute table has 1004 records. When I attempt to export this data to a file geodatabase, it only has 523 records. I have tried exporting to a personal geodatabase, ...
1
vote
0
answers
193
views
Using ArcGIS REST Service to query particular features inside BBOX?
I really have 0,0000... knowledge about OGC web services (WMS / WFS ; only limited basics). Therefore maybe this 'stupid' question.
My question might be misplaced / or have the wrong tags... But it's ...
2
votes
1
answer
43
views
Getting Area of Polygon Intersections Stratified by Categorical Variable in PostGIS
I've got two layers: counties and forest type area. The county layer is what you'd expect: a bunch of simple polygons representing counties in Texas. The forest type area layer looks like Tetris ...
0
votes
0
answers
64
views
How to determine building types and add them to the attribute table
I have a city in which the buildings are defined as polygons. I have determined the area based on these polygons, however I would also like to determine the building type (i.e. terraced, semi-detached ...
2
votes
2
answers
404
views
Getting nearest line to point with virtual layer using QGIS?
I have a streetmap and the position of hundred sensorlocations. I am currently trying to calculate the nearest line for each point. I have already done it with the nnjoin plugin. But now I want to do ...
0
votes
2
answers
3k
views
How can I add a new layer, then remove previous layer from a Leaflet/CartdoDB map without the map clearing everything
I am new to CartoDB/Leaflet. Here's my fiddle...
http://jsfiddle.net/zippyferguson/fLkqgf4q/1/
If you click the play button, I want it to load data to the map year by year from 1966 to 2015 from a ...
6
votes
1
answer
2k
views
SQL Server 2008 Distance and Performance Problem
I had been working on PostGIS to do some geographic processes and due to some reasons, I had to start to use SQL Server 2008.
I ported same code for SQL Server but performance is almost dying when I ...
1
vote
1
answer
276
views
SQL query : finding a word in a shapefile
I have a punctual shapefile containing the name of geographic locations (attribute 'name')
Using DB Manager of Qgis, I would like create an SQL query to find, within the shape, the name of a location ...
2
votes
1
answer
331
views
Find points within X distance with a specific variable
I am trying to use QGIS to find points within 5 meters of each other that all have a value of <50% for a given parameter that has been loaded through a CSV file. I looked in to doing it with a ...
2
votes
1
answer
846
views
Using QGIS query builder
I have only basic knowledge of using SQL code in QGIS. I am trying to use Query Builder to hide some specific line features. I have tried using =! and the id field reference for the particular ...
-1
votes
1
answer
58
views
Performing field calculation on new field using partial text from existing field via selection using ArcPy?
I am new to python and am having some issues with the following script. I want to select all features that have "State R%" in the field "ROADNAME" and populate another field called "Route" with the ...
-1
votes
1
answer
42
views
Selecting only those objects that have N apartments in radius of K meters using PostGIS? [closed]
Example:
we have three commercial property objects (red ones, point geometry)
we have many residential houses (blue ones, point geometry) with many apartments
Task:
Select only those objects (red ...
10
votes
1
answer
616
views
Postgis database query optimisation
I have a set of rasters in DTED format which I load into PostGIS database using raster2pgsql command line tool.
Each of rasters is simply stored in a row and described by rid and a value of raster ...
4
votes
3
answers
4k
views
QGIS Query Editor define variable
I am relatively new to QGIS. I use conditional formatting for various problems. In the qgis query editor, I would like to define a string variable for further usage, so I wouldn't have to retype the ...
2
votes
1
answer
517
views
arcpy.MakeFeatureLayer_management: query throws error 000230/000358 [duplicate]
Im trying to create a feature layer on which i want to perform a select by location, however:
arcpy.MakeFeatureLayer_management (perp, "selected","LINK_ID = 23002109")
throws:
ExecuteError: ERROR ...
1
vote
0
answers
119
views
natural=beach without all the wrong tagged sand areas golf bunker or sandy places in zoos
I would like to get natural=beach (places along a body of water at best places where you can have a bath). Unfortunately the query natural=beach ends up often with wrong "single" tagged sand areas ...
3
votes
2
answers
684
views
How to create a web-based GIS that can be queried by multiple users? [closed]
As part of my position, we're required to randomly select townships in our state, select forest, wetland, or grasslands and then throw random points into those habitats to create site for plant and ...
3
votes
1
answer
4k
views
Using the logical operator 'AND' in the query builder
I am trying to use the query builder to select numerous features in a layer.
I saw a question on here that suggests using the AND operator to do this. however, I have this to no avail.
My query ...
2
votes
1
answer
275
views
SpatiaLite - WITH, view or sub-query?
I am running on Windows 8.1 SpatiaLite_gui 1.8.0, SpatiaLite version 4.2.0 and SQLite 3.8.5.
I need to interrogate one single spatial table whith those attributes:
ID | val | val_1 | val_2 | Geom
...
1
vote
2
answers
652
views
Mapserver and postgis
Here is the relevant portion of my mapfile:
CONNECTIONTYPE POSTGIS
CONNECTION "dbname=contours host=localhost user=contour_xxxx password=xxx"
PROCESSING "CLOSE_CONNECTION=DEFER"
DATA "...
2
votes
1
answer
175
views
Selecting features from an expression
I am having problem creating a query. I have a data map, which is organised in areas with codes (which in turn correspond to funding oportunities). I am trying to select for each code a layer. Up ...
2
votes
2
answers
102
views
Can I query several layers with arcpy?
Context
I am currently working on the migration from ArcMap 10.3 to ArcGIS Pro. We have several tools that won't work anymore in ArcGIS Pro and I am checking what native solutions could be used ...
2
votes
1
answer
442
views
Counting polygons intersecting with each others in the same Vector layers
I am currently working on some line string data that are very close by and have the same Start and endpoints for the most part. I want to create midpoints or average centroids that will tell me how ...
1
vote
2
answers
148
views
How to query GIS data for overlaps? [closed]
I am trying to get a list of Election Districts inside particular City Council Districts in Brooklyn, NY. The data that is available is GIS data, visible here:
City Council Districts: https://data....
0
votes
1
answer
394
views
Query Builder Expression using NOW () function
I have a date field named "TermDate'. I would like an expression in Query Builder to only show features where termination date is in the future. My date field displays as '2017-09-27 09:59:01' I'm ...
3
votes
2
answers
319
views
Greater Than/Less Data Driven Page Definition Query?
I'm using data driven pages where each page is representing a series of points for a particular year. The problem I have is that I want to not only show the points for a particular year, I want to ...
1
vote
3
answers
301
views
PostGIS query optimisation
I have three spatial datasets - mitch_ibra has about 2700 polygons, hev has ~1,200,000 polygons and prop_p1 with about 180,000. For each polygon in mitch_ibra I want to know how many polygons of ...
3
votes
3
answers
11k
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,
...
1
vote
0
answers
295
views
Query to merge simplified polygons according to the map scale-factor [closed]
I'm trying to construct a view in PostgreSQL that simplify polygons according to the map scale-factor. Basically I was reading this thread http://linfiniti.com/2011/06/scale-dependent-generalization-...
2
votes
1
answer
280
views
Counting average of all polygons instead of every polygon in PostGIS?
I'm facing a problem with counting avg of all polygons in pgsql query. Instead of that I receive avg(of an area) of every polygon separately. My syntax is looking like this:
CREATE OR REPLACE ...
3
votes
2
answers
1k
views
How to prevent single quotes turning my parameter into a string when using a workspace runner?
I have run the below query successfully on a spatial database in a standalone workspace:
st_intersects(st_setsrid(st_geomfromtext('$(poly)'), 27700), geom)
The poly parameter brings in wkt ...
3
votes
2
answers
5k
views
Searching planet_osm_point by longitude and latitude
I used osm2pgsql to import data into my PostgreSQL database and it put gave me the following 4 tables, planet_osm_point, planet_osm_line, planet_osm_polygon and planet_osm_roads.
I have looked at ...
0
votes
1
answer
253
views
Select by Attribute on a changing date
I want to be able to select by attributes for dates that change weekly. I have gotten an invalid expression error for the follow script where the date needs to change to the current date and the same ...
2
votes
1
answer
198
views
ST_Tile col/row indices?
I want to generate tiles from a postgis raster, to be used as a tileLayer in an Openlayers map.
The tiling is fairly easy to do using ST_Tile, resulting in a new table, with each record being one ...
2
votes
1
answer
67
views
Query Producing Wrong Results
I'm doing a simple query on a points feature class that has a table joined to it. I'm querying for values equal to 0 and my results are incorrect.
No coded domains, this is on ArcMap 10.5. Any ...
-3
votes
1
answer
77
views
Is there a function when using Select by attributes, to select only the continents' annotations? [closed]
Annotations beginning with character "C" refers to continents and I want to select only these annotations.
0
votes
2
answers
4k
views
How to exclude several values in a definition query [closed]
I need to set up the definition query for a layer to exclude several types of values for a particular field. It is a status field that that has values such as Active, Inactive, Void, Received, etc. ...
0
votes
2
answers
703
views
Oracle search against intersect of a region that covers the whole world doesn't find any records
I am new to Oracle Spatial, I am trying to implement a service that will take coordinates from a map, and search our database to find any geometries that intersect with that map view. I works fine for ...
1
vote
1
answer
382
views
Build a polygon raster as indexing grid with SQL
According to the plugin Indexed Vector Grid which builds a polygon raster from shape bounds and name every cell as "A1, A2, A3 ...", I need a more advance solution, which I can use for hundreds of ...
1
vote
1
answer
422
views
Using ST_Value from raster to query second table in PostGIS?
This is a continuation of Returning raster values from multiple raster tables via Lat/Lon in PostGIS?, but feels sufficiently distinct enough to warrant its own post.
I am trying to select values ...
0
votes
0
answers
694
views
Why does this NOT LIKE query find too many features from FileGDB and PostGIS vs a Shapefile? [duplicate]
I can't understand why the following NOT LIKE query removes not just the ones that end in '% Lake' but blank records too for certain data formats within both PostgreSQL with PostGIS and QGIS. This ...
2
votes
2
answers
5k
views
Selecting features within polygon from another layer using R or Python? [closed]
For Selecting features within polygon from another layer using QGIS? the solution was to:
use the "Vector->Research tools->Select by Location"
However, I would like to know how to do the same ...