A command used to retrieve information from a database

learn more… | top users | synonyms

1
vote
2answers
34 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
120 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
922 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
723 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
36 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
5k 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 ...
-1
votes
0answers
18 views

Is there a way to perform toolbox queries on temporary files?

I have temporary files and cannot for some reason make them a permanent raster file, and so need to perform some toolbox queries, build attribute table, zonal statistics etc. but cannot?
3
votes
1answer
175 views

How to select an limited TOP n from a 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 ...
0
votes
1answer
827 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 ...
2
votes
2answers
157 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 ...
2
votes
2answers
65 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 ...
1
vote
1answer
836 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
191 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
75 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
0answers
11 views

What are the standard ways of querying raster layers for information?

My use case involves loading raster maps as a layer on a base map (built in Mapbox/Leaflet) such as: http://landcover.usgs.gov/global_climatology.php or http://due.esrin.esa.int/page_globcover.php ...
0
votes
1answer
980 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 ...
0
votes
1answer
32 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 ...
0
votes
0answers
67 views

pgsql2shp query error select

I need to export from postgis some data obtaining the center of my polygons, now I'm working on Ubuntu. My command looks like this: ./pgsql2shp -f /home/me/ESTADOS_POINT -h localhost -p 5432 -P ...
1
vote
0answers
32 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 ...
4
votes
3answers
3k views

Selecting MAX values within records with the same name

I'm working in ArcMap 9.3 and I've never dealt with that kind of queries... I need to Select the MAX value from column [A] for each set of records in the table which have the same value in column [B] ...
2
votes
2answers
60 views

Count Distinct with Where clause in OGR

I am looking to run a query in OGR to write back all instances where there is only one record of an attribute. I was thinking that I would use the following: ogrinfo -dialect sqlite -sql "SELECT ...
0
votes
1answer
32 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 ...
1
vote
1answer
75 views

PostGIS Query To OpenLayers

I am trying to get data from a PostGIS datatable using .NET, pass it to javascript, create a layer in OpenLayers and add the PostGIS data to the layer. I can successfully query from the ...
0
votes
3answers
76 views

Pass GeoJSON from .NET to Javascript

My .NET/OpenLayers/GeoServer/PostGres-PostGIS application allows users to create custom queries to get data from my PostGIS tables. The queries are called in .NET (not javascript) using a web method ...
1
vote
1answer
33 views

Creating a menu interface to update an sde feature class in ArcMap using arcpy?

I work in electrical utilities and we have stacks of paper records that need to be updated into an existing SDE feature class attribute table. My problem is that someone in the city's GIS office would ...
1
vote
1answer
42 views

Making table from MySQL query with ArcPy?

I am trying to interact directly with data from a MySQL database in ArcMap using Python. So far, I have successfully connected the database using the MySQLdb.connect() function and have successfully ...
28
votes
3answers
2k views

Is there a “Select by Attributes” plugin/widget for ArcGIS Server JS API?

I'm hoping to find some existing code which emulates the "Select by Attributes" dialog in ArcMap, within the ArcGIS Server JavaScript API. Writing a hard-coded QueryTask is easy - I'm looking for ...
2
votes
1answer
41 views

QGIS and intersections

I have MultiLineString geometry data from an ESRI shapefile. I also have a polygon (region) that I have created in QGIS using the drawing tools. When I attempt to find the intersection between the ...
1
vote
1answer
35 views

Postgis/SpatiaLite SQL query to connect MySQL, Access or Oracle database

In SpatiaLite or Postgis, how can one create a SQL query to read a table from a MySql or Oracle database? I don't know **the correct SQL syntax to connect to a table in a MySql or Oracle database ...
0
votes
0answers
35 views

Publish postgis raster based on column value in geoserver

I have a postgis raster table with the following columns: rid, rast, year, plant I created a wms layer in geoserver pointing to the table and successfully serve out the raster when the table only has ...
1
vote
0answers
25 views

Shape comparison language (SCL) - get shapes which intersect extent border

I am trying to write a SCL string for my ArcGIS query, which should return only shapes which are intersected by a border of a rectangular shape (extent). So far the closest I've got is the following: ...
3
votes
2answers
65 views

Copy/convert selection into filter/query builder of QGIS?

Can anyone tell me if it is possible (and how) to convert or copy a selection on a layer (that has not been created through "select by expression", but instead by irregular selections from a canvas, ...
1
vote
1answer
55 views

How to make a SQL query that would sum multiple records in ArcGIS?

I've got a large file geodatabase that contains a polyline feature class of water-pipes. The feature class have many fields, but the ones that I'm interested in is that of the water-pipe's Length and ...
1
vote
0answers
29 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 ...
5
votes
1answer
107 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 = [{ ...
12
votes
6answers
4k 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 ...
1
vote
1answer
44 views

Delete polygonal features in one layer outside polygon feature of another layer in PostGIS

For deleting polygonal features in one layer (~1000000 features) outside polygon feature of another layer (one feature) in PostGIS I use query: DELETE FROM layer WHERE layer.id IN (SELECT a.id FROM ...
5
votes
2answers
1k views

How to speed up an st_intersects() query?

I have a "huge" spatial database: 72GB, 200 millions documents with geometries (points) I have a GIST index on the geometries the database: CREATE TABLE resources ( id bigint NOT NULL, accuracy ...
1
vote
1answer
3k views

Setting query loop in ModelBuilder/ArcPy?

I am looking to apply a Select By Location protocol to my data, but need to first query individual IDs in my target and source layer (the same ID in each table, one at a time). How do I loop through a ...
0
votes
0answers
48 views

Overpass-API Ability to download the nodes and ways that intersect the ways of one relation

i am trying to do a query that will detect if a node or way that is included in a relation is also referenced by other ways,nodes or relations. Not sure if this is possbile, i had tried to do this ...
0
votes
1answer
52 views

Dojo Promise/All Array Not Populating InfoTemplate in ArcGIS Javascript

Using dojo/promise/all I'm attempting to populate an infoTemplate with results from a queryTask which runs later in the script. Our app returns an XY value from a geocoded address search and queries ...
0
votes
0answers
200 views

Multi-level filtering with Web app builder query widget

I have options to use web app builder and web app builder developers edition to design a query task to find a street number. For example, I have got 4 villages and each villages have 10 streets. In ...
1
vote
2answers
993 views

ST_DWithin uses Geometry or Geography type

assuming I use the following query to match the locations to a poi within 10km distance: SELECT poi.poi_id, h.loc_id, (ST_Distance(poi.geom,h.geom)*111.111) as distanceinkm FROM iut_poi_transl AS ...
1
vote
0answers
17 views

How to show neighboring polygons and polygon in which point exists

We have a table which has polygon related data stored. For finding if a point (long,lat) is within that polygon I am using following query in mysql SET @vasantKunjSectorC = 'polygon((77.161266 ...
2
votes
2answers
133 views

Selecting features within polygon from another layer using R or Python?

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 ...
2
votes
2answers
3k views

Built a query for polygon Shapefile in R

I use the package maptools to read in Shapefiles in R. I would like to know if there is a function that can built up a query/subset to select only some Polygons based on a specific attribute in the ...
1
vote
1answer
37 views

Query across layers of SHP files?

I would like to query features from a SHP vector that intersect with features from another vector. Pseudocode: "Name" IS intersects( countries) How would be the valid query composed?
1
vote
0answers
33 views

Partial extents for ArcGIS android geodatabase creation

I know how to create and download a geodatabase copy of a FeatureServer from arcgis rest services. I also know how to pass LayerQuery to the geodatabase task to filter layer objects and features. ...
-1
votes
2answers
138 views

Sql Query in Postgresql

I am trying to execute a query but I am stuck. I have two tables A and B. The a table has columns gid, geometry(line-string) and value which cells is empty , the B table has got 3 columns gid, ...
5
votes
2answers
298 views

QGIS Filtering Multiple Values using Query Builder

I am a complete beginner in QGIS, so I'm sorry if I don't use the right terminology. In the "Query Builder" I can currently filter on value from the "Values List", but I'd like to be able to filter ...