A command used to retrieve information from a database

learn more… | top users | synonyms

10
votes
3answers
788 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
391 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
944 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
153 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
361 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
312 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
645 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
160 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
283 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
576 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
195 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
231 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
84 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
875 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
211 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
1k 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
384 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
654 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
0answers
155 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
1k 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
263 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
859 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 ...
2
votes
1answer
778 views

Geometryutil, simplify polygon, querytask and query fault error

One of the tools in my app is to draw freehand polygons (counties) to show points (companies) in each county. Everything works great but if the user creates an intersecting polygon then I have a ...
1
vote
1answer
103 views

Does linux suport “like '%c'” filter(cql_filter)

I can execute the following request: http://My.host:8080/geoserver/wfs?request=GetFeature&version=1.1.0&typeName=topp:states&cql_filter=STATE_NAME like 'California' But I can't execute ...
4
votes
2answers
1k 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] ...
1
vote
2answers
62 views

2 Similar Queries Run at Vastly Different Speed in a Very Surprising Way

I have to be very careful here. Both queries are so similar that the only different is the area searched. What's surprising is the query that run on BIGGER AREA, and naturally yield MORE ROWS, is the ...
10
votes
5answers
2k 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
2answers
292 views

postgis, mapserver & openlayers: if data is not in table give an error / pop-up

I have created a website with postgis, mapserver & openlayers. On the website you can enter a postal code and then a drivetime isochroon is created. The problem now is that you can enter ...
11
votes
3answers
925 views

Are personal geodatabases better suited for quickly querying indexed attributes than file geodatabases?

I'm preparing data for an ArcEngine application that queries the data to search for an address. Sometimes we search just on the street name field, just on the house number field, or both. When using ...
1
vote
0answers
330 views

Cannot join feature layer with SQL Server table with query built in it in ArcMap

I need to join a feature layer with a SQL Server View with a common field in ArcMap. The View was successfully added to ArcMap as data table with some query built on it from Query Builder. When I ...
6
votes
1answer
447 views

Need to learn more about Precision and Accuracy

I am currently taking Introduction to Image Interpretation online and there is a section in it that talks about Precision and Accuracy. I wanted to know if someone out there has any good information ...
3
votes
1answer
2k views

How to filter features in a layer?

I am trying to display certain features in a shapefile-based layer using QGIS. I have found the subset function in the properties panel, which does exactly what i want, but is too tedious given that I ...
3
votes
0answers
247 views

How to get distinct values from multiple columns in GeoTools?

Is there a way to get distinct values from multiple columns in geotools? I know I can get unique values from a column like this: SimpleFeatureSource featureSource = ...
2
votes
1answer
760 views

Why does my PostGIS query fail with “current transaction is aborted”

I'm trying to create a vector layer in a QGIS project using a PostGIS query. QGIS is returning the following error: Query failed 1 cursor states lost. SQL: CLOSE qgisf1 Result: 7 (ERROR: ...
0
votes
3answers
425 views

How can I query and categorize a shapefile using MS Access?

Is there a way to categorize locations by lat-long in MS Access using caparisons to shapefiles?
5
votes
1answer
2k views

How do I perform a proximity search with Postgis?

OK, so I downloaded the Geonames database (cities1000) and wrote a small Ruby program to import them into my table (geo_cities). I then added geography column called geog. So after all of that, I ...
2
votes
1answer
1k views

PostGIS UPDATE Statement with ST_Contains(table1.geom, table2.geom)

I'm strugeling with a query I should write to UPDATE my dataset. First of all, I have 2 tables containing data and I need to mix it. Tabel 1 -- lets call it names: name_str the_geom (points) ...
2
votes
1answer
316 views

How to query OSM tags by polygon?

I do not know whether something like this is possible but nonetheless. If I understand OSM correctly all objects essentially have associated tags based on type of object (street, building etc) ... ...
1
vote
1answer
456 views

Administrative level and coordinates from Yahoo GeoPlanet WOEID

The Yahoo GeoPlanet data can be freely downloaded from: http://developer.yahoo.com/geo/geoplanet/data/. If I understand it correctly, each WOEID corresponds to a unique location on earth, with ...
4
votes
3answers
4k views

How to fix performance problem in PostGIS ST_Intersects?

I'm a newbie in postgis and I have a problem in query performance. This my query: SELECT DISTINCT ON (userid) userid ,ST_AsText(position), timestamp FROM table1 WHERE ST_Intersects ( ...
3
votes
1answer
2k views

Export query to identify what polygon certain points fall in

I'm using Arc GIS 10. I have shapefiles consisting of points (street addresses). I also have shapefiles consisting of polygons (ie, congressional districts, city council districts, etc... a separate ...
5
votes
1answer
2k views

How can i search over my layers with openlayers?

i have my map running over geoserver and openlayers. but i want to add a search box to find places in it. Well not specifically places but directions. The map reads the layers directly over geoserver ...
28
votes
2answers
1k 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 ...
6
votes
1answer
511 views

How to sum area of polygons by values occuring in multiple fields?

My data has 2 fields holding landuse types, which both describe what is within the polygon. For example, the polygon may have Type1=Retail, Type2=Leisure Area= 1 but another polygon has Type1=Leisure, ...
4
votes
2answers
910 views

What is the best approach to using IQueryFilter.WhereClause in ArcObjects?

What is your preferred / best approach to using IQueryFilter.WhereClause statements in ArcObjects (e.g. when selecting features by attributes)? You need to check the source type (shapefile / personal ...
4
votes
2answers
385 views

ArcObjects ISQLSyntax with Oracle DB esriSQL_DelimitedIdentifierPrefix issue

New to stack exchange, heading over from the esri forums, it is great! I am trying to produce a query that I can use across all workspaces, naturally using ISQLSyntax. The problem I'm having is that ...
9
votes
2answers
2k views

How to select features with NULL attributes in QGIS?

I need to identify which features have null attributes in the attribute table of a shapefile. When i try [field]= 'NULL' it selects the features with value=0 (see picture) Suggestions?
3
votes
2answers
610 views

Why is my Definition Query not returning any records?

I am currently working on a mapping project and only need 8 tenements out of many to appear. I have gone into the query builder to complete this and unfortunately it will not work. Into the builder a ...