A command used to retrieve information from a database

learn more… | top users | synonyms

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
180 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
990 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
222 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
83 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
842 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
207 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
350 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
631 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
150 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
256 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
819 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
744 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
102 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
288 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
895 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
313 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
436 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
242 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
739 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
409 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
309 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
446 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 ...
3
votes
3answers
3k 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 ...
4
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
494 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
873 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
380 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
590 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 ...
2
votes
1answer
2k views

Basic MapServer query of PostgreSQL/PostGIS database

I've just installed MapServer on a linux server and I am trying to understand how to display a basic map using a PostGIS database. I have displayed a shapefile in the browser, so I know that the ...
11
votes
1answer
546 views

Nearest Neighbor Grouped Selection in QGIS

OK - so I have an interesting problem I am trying to solve. I have a list containing over 100,000 points in lat/long format which I have imported into qgis. Now, what I am trying to do here is group ...
0
votes
1answer
244 views

Trouble with Request URLs sent by QueryPanel.js

I use the GeoExt QueryPanel, which I got working so far. I configured an osgeo proxy on my Apache Server, I use the override-ext-ajax.js and have the OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url="; ...
1
vote
2answers
555 views

False DescribeFeature Request URL in GeoExt QueryPanel

I got the GeoExt QueryPanel working so far, it recognizes the layers available on my Geoserver but it is not able to get the attribute columns for the dataset. I configured an osgeo proxy on my Apache ...
0
votes
2answers
854 views

Mysterious MapInfo query syntax errors

I'm struggling to get what seems like a perfectly normal query to execute in MapInfo v10. In SQLite Manager (an excellent firefox plugin), this works as expected: SELECT area_name, street_name, ...
2
votes
0answers
635 views

Proxy trouble with GeoExt Query Panel?

I got the GeoExt QueryPanel working so far, it recognizes the layers available on my Geoserver but it is not able to get the attribute columns for the dataset. I configured an osgeo proxy on my Apache ...
5
votes
2answers
753 views

Practical way of managing polygons and unions of them

I have a table in PostGIS with a quite fine partition of a region, which I'd like to dissolve at two higher levels by means of two foreign keys (e.g. municipality and state). The partition is a real ...
0
votes
1answer
2k views

Query Feature using OpenLayers + MapServer

I'm trying to query a feature in OpenLayers, but it's returning just an image highlighted that is not possible to make zoom, pan and drag. My intention is to query a feature on the map like street ...
2
votes
1answer
824 views

troubles with osm2pgrouting

I'm trying desperately to write my first query in pgRouting using maps in osm format (as shown in http://www.carsonfarmer.com/?p=799). Im using Ubuntu 10.10 with Postgresql 8.4 ang postgis 1.5. After ...
8
votes
1answer
658 views

ST_ClosestPoint(line, point) does not intersect line

In my PostGIS database (PostGIS 1.5 on Postgres 8.4.1), I have two tables: roads (composed of linestrings) and crashes (composed of points). I've been trying to correlate each crash to a road, but I'm ...