A command used to retrieve information from a database

learn more… | top users | synonyms

1
vote
1answer
780 views

Querytask/query - executed select

Is there a way to get to the query condition, which is executed under the querytask ? I have an example, which is actually a copy of this ArcGIS example ...
1
vote
1answer
206 views

How can I change SQL query through a layer of an action (python)?

I have three layers from three diferent database tables. When I click in other layer I want to change (with an action) the query of that three layers. How can I do that? Thank you
4
votes
3answers
493 views

How to create Where Clause from user input via Python list?

I am trying to perform a query based on values in a Python list. The where clause will then be used in an Update Cursor, so that the rows NOT equal to the values in the list will be deleted. This is ...
3
votes
1answer
386 views

Reading OGC geometry data from SQL server using R

I would like to write a script in R that creates a map using OGC geometry data that is stored on a Microsoft SQL server. Is there a way to read OGC geometry data using a query passed from R? Maybe ...
0
votes
1answer
116 views

In QGIS can I show just the lines in a Postgis query? How can I do that?

I have three tables in Postgresql, each table with one layer of lines. I want to show the path of an initial line to another final. Is it possible executing a SQL query? Thanks My three tables are ...
4
votes
1answer
857 views

How to Find points in a Kilometre radius

I am new to PostGIS and GeoData. I need to find where the lightning has stroke by a period of time and kilometre radius based on a given location. I have given lon/lat and my table is: latitude ...
1
vote
1answer
292 views

How to get the nearest line to a feature?

I have features on map, and i want to get the nearest poly-line to each one. How to write spatial query to get the nearest one. I tried to use ISpatialFilter but i couldn't reach anything.
5
votes
1answer
773 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 ...
2
votes
2answers
375 views

Selecting lines occupying identical positions in MapInfo or QGIS

I have two shapefiles from a client, one is their entire network (complete with unique IDs) and another a selection I need. However the selection file does not have unique IDs but the entire one does. ...
1
vote
0answers
485 views

ArcGIS API Javascript - FeatureLayer from json: problem with queries and popup

Hello everybody I've tried this code proposed by Derek Swingley in JSFIDDLE: JSFIDDLE-FeatureLayer from JSON Everything "seems" to work fine, but not always. If you go down to the closer scale (level ...
0
votes
1answer
44 views

Isolate And Save Raster Features From Existing Multivalue Raster Map

I have Cyprus Corine map with 44 different types of land use. I want to run a raster calculator query or any other way to isolate the areas with codes 10 to 22 and 26 to 34, all other values 1 to 44 ...
1
vote
1answer
85 views

How to get routes in the database that intersects circle?

I have routes (linestrings) recorded in the database. I want to create a query which returns the routes that have some commonality with a circle whose center and radius are passed as parameter. I ...
8
votes
2answers
2k views

How can I more efficiently select related records?

Below is the code I'm using to replicate the "related tables" button in ArcMap. In ArcMap that button selects features in one feature class or table based on the selection of features in another ...
1
vote
0answers
170 views

Query to find lat/lon of a house by street.name & house.number

How can I get house coordinates (latitude, longitude) by street.name and house.number? If it is possible, how I can get it? Many thanks!
4
votes
3answers
1k views

How to join two tables using date, time, lat and lon as common field?

I am sorry if the question is elementary but I did not find any clear discussion or guide to understand how to run a query in postgresql. So that a pointer to another website would be also useful. ...
8
votes
3answers
2k views

How to query all records (>1000) and export to csv?

I posted in arcgis forum but never got any answer. Can anyone tell me how to solve this? Assume you have a vehicle tracking records from Oct.1 to Dec. 31 with wind speed information. All data is ...
2
votes
1answer
151 views

How to best execute the same query on many different vector layers?

I have some vector layers in my project and I need to separate the polygones by area (I need a copy of all shapes > 2ha). I know how to do this for each separate layer (query) but is the a tool to do ...
5
votes
2answers
1k views

How do I use QGIS python console to iterate through simple layer queries and png outputs?

I'm really new to QGIS coding and I'm having a hard time finding (especially) the api classes/functions to carry out actions of the Query Builder window. I'm basically trying to do this: Iterate ...
3
votes
1answer
241 views

How to filter layer of osm data?

I have a table osm_roads that has a column named geometry geometry geometry(LineString,900913). If I want to filter a city to draw districts, I cannot do it by geographic coordinates? What if in ...
2
votes
1answer
678 views

How to save WMS getFeatureInfo points to a layer?

This may be a poorly worded question, because I am not sure of the exact terminology, but I'll give it a shot. I have imported a vector layer from a WMS server into QGIS. I am able to query the ...
5
votes
2answers
942 views

PostgreSql query problem with aggregate functions

I need help with a PostgreSql query. I need to find all parcels which have bigger area then average. I'm using this query: SELECT OBJECTID FROM parcela WHERE ST_Area(geom)<(SELECT ...
5
votes
1answer
1k views

Querying Data with a 1-Many Relationship Class

I have created a relationship class similar to the one I posted about in this question. Essentially, there is a point feature class representing a location of vegetation clearing with attributes ...
13
votes
3answers
4k views

Idiots guide to expressions for QGIS

I have no formal training in GIS and have learned on the fly with ArcGIS 9.3 at work and have been dabbling with QGIS on my own time for my business. Is there any resource recommendations ingeneral ...
5
votes
1answer
577 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 ...
0
votes
1answer
668 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
231 views

How to filter or query data in GRASS?

I have a PostGIS dataset with just over 2 million rows. Each row has a PostGIS geometry point value and several attributes. I'd like to do some analysis on certain subsets of the data, but I can't ...
10
votes
3answers
943 views

How to speed up queries for raster databases?

I have a raster database in postgresql/postgis with these columns: (ID, rast, data_of_data). 'rast' is the column that has raster files in WKT format. An example query to find the DN value of a ...
2
votes
2answers
440 views

How fill length and feature count in PostGIS table for each polygons

I'am new to PostGIS/PostgreSql. I have a database which containts two shape-files : polygonal layer towns and linear layer of roads To calculate the length and feature count of 'Streets' inside ...
2
votes
2answers
1k views

Spatial index to speed up the query

I have spatial table in PostgreSQL 9.2 / postgis 2.0 that I have to extract some information from it. But my query is hopelessly slow. How could I make use of spatial index to improve the performance ...
3
votes
2answers
155 views

Multiple queries in a row

I have osm data imported into PostgreSQL with osm2po tool (wich makes the data routable). Also I have imported data relationed with nodes and node_tags with osmosis tool. I need to obtain a set of ...
3
votes
0answers
403 views

How do I determine appropriate Date query syntax for a layer?

I'm writing a web mapping query tool to query Esri mapservice layers by date using the REST API. It has been said that the syntax depends on what kind of database is behind the mapservice layer, as ...
4
votes
1answer
326 views

Improve database performance for geospatial

I have a database with osm data imported with osmosis tool. I want to search for the nearest POIs from a given point. For this purpose, I perform this query: select id from nodes where ...
4
votes
2answers
711 views

Spatial query of raster data

I have population distribution data as a raster layer and exposure contours as vector (polygon) layers. What I'd like to do is use the vector layer to estimate the population indicated from the raster ...
3
votes
1answer
172 views

Editing and Deleting Query Tables in ArcMap

How do I edit the query for a Query Table after it has been created? How do I permanently delete a Query Table? Even after I do right-click -> remove, it still appears in dropdown lists.
7
votes
2answers
302 views

How to run a spatial query with a raster and vector layer in QGIS?

I have a soil map (vector-polygon layer) and a map of the crops farmed in the same area (raster layer, from the US Cropland Data Layer). I would like to calculate for a given soil type, the surface ...
3
votes
1answer
657 views

Using Google Earth to query database

I've been reading about using Google Earth to query data (this article) and I'm interested in learning how to make one of these. I just have a couple of questions: 1. Is this possible with the free ...
3
votes
3answers
1k views

How to join Shapefile and Excel data without unique ID column?

I have one huge shapefile with lots of roads (polylines) along with various attributes and I have an Excel file containing some of these roads by three same attributes (road no., section no., length) ...
3
votes
1answer
222 views

How to query against time

I have a date-time field in a feature class which I want to query. The field has values like "2011-01-01 00:00:29". I want to query the data between the time 00:06:00 and 00:12:00. The date does not ...
2
votes
2answers
1k views

How to query multiple features from Geoserver WFS?

Are there any methods to query several features by id other than one entry by a single url request? The scenario is I store around 200 point layers in PostgreGIS. Each maintains 100k entries GPS ...
1
vote
1answer
261 views

I'm trying to zoom to a graphic, but nothing happens

I'm trying to zoom to a graphic retuned from the query; query.OutSpatialReference = MyMap.SpatialReference; query.ReturnGeometry = true; After this query I used ...
1
vote
2answers
85 views

How to query points that fall outside their designated regions?

I have a shapefile with 250 points. Each point has a region attribute. In another shapefile I have all the possible regions with their names (it is polyline geometry). Unfortunately the coordinates ...
2
votes
2answers
971 views

query raster in ArcGIS 10

I am using ArcGIS 10 (includes spatial and geostatistical analyst). I have a raster (GRID) with a value range of -167 to 18. I would like to query the raster and create a new one with only the values ...
7
votes
3answers
225 views

What would be 'normal' processing time for a large postgis query

I have two datasets which I want to spatially join (with an intersect). The first dataset consists of 9 million addresses. The second dataset consists of 12.000 neighbourhoods. I want the add the ...
4
votes
1answer
2k views

How to find the nearest point by using PostGIS function?

table A: lat | long | the_geom | code | sign 13.8433095 | 100.6360357 | 0101000020E61.... | ABC | start_point 13.7544738 | 100.5459646 | 0101000020E6..... | ABC | end_point 13.4124215 | 100.6232332 ...
8
votes
3answers
449 views

How to select only Spatial tables from the postgres 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 ...
2
votes
1answer
718 views

How to query attributes cross-table in QGIS?

is it possible in QGIS to query a layer with data from another layer? And if so ... how is the syntax for that? Usecase: I have a lot of image-position points and a lot of monitoring sites. I would ...
1
vote
1answer
174 views

Using database tables with bigint columns in ArcMap query layer

I am very new to GIS and am using the ArcMap 10 program. Currently, I am trying to set up a query layer from a remote database. I am able to connect to the database, but I am having trouble making ...
1
vote
1answer
2k views

Setting a query loop

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 ...
3
votes
1answer
288 views

TO_DATE query on ArcSDE for Oracle dataset failing?

I'm trying to use TO_DATE to query an Oracle SDE dataset. It's not working in the javascript API application so I tried to query the rest end point directly and I get the error: "Unable to perform ...
1
vote
0answers
952 views

How to fire a query from OpenLayers to GeoServer to fetch 'the_geom' column in PostGIS table?

I am coloring the polygon shapes of world_country. I have OpenLayers in my UI, GeoServer as server and PostGIS as db. All I want is fire this query: select the_geom from world_country where ...