A command used to retrieve information from a database

learn more… | top users | synonyms

0
votes
0answers
50 views

QGIS spatial query cryptic error message

I tried running a spatial query plugin to return features in SpatialLite layer that fall within selected feature on MapInfo .TAB layer, which worked fine, selecting 3 items. But when I tried creating ...
0
votes
1answer
265 views

How do I search dates using the ArcGIS REST API?

I'm trying to understand how dates are queried in the ArcGIS Server REST API (v10) using the query functionality (...MapServer/find?searchText=...). If I search on a string attribute I can get a ...
1
vote
0answers
52 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 ...
-1
votes
1answer
132 views

Shortest Path Dijkstra

I would like to calculate the shortest path with dijkstra algorithm. sample query SELECT seq, id1 AS node, id2 AS edge, cost FROM pgr_dijkstra(' SELECT gid AS id, ...
0
votes
1answer
81 views

How to cut/split multipolygon with blade (linestring) into two pieces using PostGIS? [closed]

I struggle to do split operation in postgis I tried to build a query but Im always fail. Id like to cut a multipoligon with a blade (a linestring) into two pieces. These two objects have specific ...
1
vote
1answer
42 views

Rewrite query to match two points with a linestring in a different database table

OK, not sure if I've worded the title brilliantly, but here goes: Suppose I have: a table "gps_nodes" containing columns: "EASTING" (containing longitude data) "NORTHING" (containing latitude ...
3
votes
1answer
333 views

PostGIS intersection function

I have a problem with intersection function. I built my query following http://manual.linfiniti.com/en/postgis/geometry.html, 5.7 section. I made my clip object, a red linestring frame: But after ...
2
votes
1answer
195 views

Definition query that returns based on date in arcgis

I was wondering if anyone knew how to build a definition query in Arcmap 10.0 that returns only features that are f.e. only 7 days old. I have a SDE geodatabase with polygons, each with a ...
3
votes
1answer
59 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 ...
4
votes
1answer
61 views

Finding percentage of feature in a raster

I am attempting to find the percentage of polygon features at a 5 meter resolution that are located inside each 25km raster cell. I am looking to assign percentages to each cell based on the ...
0
votes
2answers
55 views

Select area which is at least x meters away from other geometries

In my table I have the build-up area from a region as a big number of polygons. urban_area: id | name | geometry(polygon) I was wondering if and how I would be able to find the area within a ...
0
votes
0answers
63 views

Find area with highest relative density of one type of object

I'm using PostgreSQL/PostGIS and I have an advanced type of query. My database contains two types of object - let's say pubs and churches :) Is there a way that I can find the area with the densest ...
7
votes
1answer
221 views

What is the precision of SELECT DISTINCT on PostGIS geometry column?

I wonder what the precision of the SELECT DISTINCT operator is on a PostGIS geometry. On my system, the following query gives me a count of 5, which means that the inserted points are considered equal ...
0
votes
2answers
213 views

What causes ExecuteError: ERROR 000358: Invalid expression Failed to execute (SelectLayerByAttribute) on shapefile? [duplicate]

My script runs perfectly for feature classes, but not shapefiles. It crashes at the point of selection, provided there is a query. gp.Workspace = "C:/someworkspace" fc = "featureclass.shp" query = ...
1
vote
0answers
63 views

Querying and summarizing/reporting a multiple tables database

I have to create a database with information on Scottish buildings from 17 and 18 centuries. In order for my data to be searchable I need to have a series of tables connected with 1 to many ...
0
votes
0answers
43 views

Newbie, I want to make a map that shows something along the lines of the following:

What is the average income for housing units (middle, mixed, family, etc.) within a 2 mile radius of parks for the City of Anaheim? or What is the average number of parks within the 1/2 mile radius ...
0
votes
1answer
650 views

How to find points inside each polygon in Mysql?

I have points table (with latitude and longitude columns) and polygons table with geometry stored in Mysql. I want to get points inside one polygon, for example in polygon which has column ...
0
votes
0answers
39 views

Exclude any geometry contained within another in geodjango queryset

I am trying to get a set of non-intersecting model objects my a GeoDjango project. I have a model with a polygon geometry field, and it represents a collection of buffers. The model definition is as ...
0
votes
1answer
109 views

Defining a WHERE clause from a subquery for a query to create a handy view

It is about my implementation from an answer of this question. It is more an postgresql issue than a GIS issue, whereas it is about geometries and spatial queries. I want to create a view from the ...
2
votes
2answers
397 views

Postgis, get the points that are x meters near another point, in meters

I'm trying to find the points within a certain distance, in meters, from another point. I'm using the function ST_Buffer, but I don't get how to express the distance in meters. I'm trying with ...
0
votes
0answers
78 views

Query area without “AREA” field

In ArcGis 10.2 I'd like to show only polygons over 1m2, using something like a query. Can I do this without adding an AREA field and calculating/populating it in my table ?
1
vote
1answer
212 views

Select by SQL in QGIS Python

In the GUI there is the Query Builder, but that does not seem to be easily available in Python. The processing (SEXTANTE) module has the qgis:selectbyattribute algorithm, but that only supports ...
5
votes
1answer
138 views

How to build query expression to display text from one-to-many relationship in ArcMap?

I have two tables in an enterprise geodatabase stored in PostgreSQL and accessed via ArcSDE: parcel and person 1 or + parcel can have 1 or + person (relationship is pll_person) I can display all ...
0
votes
1answer
277 views

PHP/MySQL, PostgreSQL spatial queries. Find a polygon that contains a coordinate? [closed]

I am building a non mapping javascript app and I am wanting to take a lat/long coordinate and query a MySQL table of polygons for the one that contains the point. I have looked into MySQL spatial ...
1
vote
1answer
43 views

Is it possible to extract many municipalities out of a state map at once?

Is it possible to extract many municipalities out of a state map at once? I mean not to have to do the QUERY for each and one of them? Thanks in advance.
0
votes
2answers
74 views

How to find polygons with area size between 300 and 500?

I have bunch of polyygons, all with different area-size. I want to find polygons with areasize between 300-500. Normally I would pick out everyone above 300 (query1) and then commit a new query on ...
1
vote
1answer
113 views

Computing altitude from contour table - slow ST_Dwithin query

I am using PostgreSQL 9.2/PostGIS 2.0. I have a table of house addresses and a table of contour lines which are as follows: address_list house_id | geom (point, 4283) ---------+--------- 1 | ...
1
vote
1answer
88 views

How to solve 'syntax error, unexpected LE' in QGIS query builder?

I have a very simple question about the advanced query builder in QGIS. I'd like to search for a range of numerical data values in the attribute table, but asking QGIS to show me values that are ...
5
votes
4answers
100 views

uDig window to change between historical dates?

I'm new to uDig, but I'm experienced Java developer. I have points with temperature measurements that change overtime in SQL database. I would like to give user ability to change between historical ...
0
votes
1answer
112 views

How to filter shapefile using definition query?

I have a point shapefile which I want to interpolate using IDW interpolation. However, I want to interpolate only those points which satisfies a certain condition. I need to do it in python and I ...
2
votes
1answer
114 views

Model or Code to query all feature classes in geodatabase by selecting by attribute

I have a geodatabase that has 60+ feature classes that each contain records for 60+ locations. I need to export all records from each feature class for a specific location. In each FC there is a ...
0
votes
1answer
316 views

OpenLayers CQL filter gets info about NOT VISIBLE features

I have a WMS layer and a control WMSGetFeatureInfo. If I apply a CQL Filter to the layer and I redraw it, the WMSGetFeatureInfo control continue querying also NOT VISIBLE features. Why in your ...
3
votes
2answers
401 views

How to group and count attribute data?

I have a problem with group same data to count it. for example, i want to group same code to one and count them. i can do it when i use MapInfo (Pic 1) but i can't in QGIS. (Pic 2: i can classify ...
1
vote
1answer
143 views

Mapinfo SQL Query for compare for edited data in tables

I have a table that contain several columns, each has their own data. then, someone have made some change in the data (just a little one data editing). how do i know later what data have been ...
1
vote
0answers
73 views

PostGis search query on hstore tags

I am writing a search client, to query postgis db. The search query will be, SELECT tags->'name' AS name,ST_Transform(way,4326) AS pt_lonlattext FROM planet_osm_point WHERE lower(tags->'name') ...
1
vote
3answers
124 views

How to search for several different features in the attribute table?

I guess my problem is a quite simple one, but the query builder and I have our difficulties, so maybe someone can help me. I have a long attribute table in QGIS and am trying to extract about 200 ...
3
votes
2answers
106 views

Determining closest representation of polygon as collection of points+radii

Have a bit of a tough question, which I realize there may not be an easy solution to. Figured what better place to ask. I'm attempting to transform a polygon into a series of arbitrary points with ...
1
vote
2answers
86 views

Reverse querying

Is it possible to run a reverse query? In other words, I have a master shapefile and a derived shapefile containing data extracted from the master file, but don't know what criteria the extraction ...
1
vote
1answer
72 views

Counting and sum by two layers

I´ve got to layers, both polygons. Layer 1 consists of propertiers, where ID is individually names. Layer 2 consists of lakes. The query I want is: Total count of squaremeters of lakes for each ...
1
vote
2answers
622 views

spatial query st_contains postgis

This seems too simple to be asking this but I am really new to postgis/postgres have been going around in circles with this. I am performing a really simple spatial query where I would like to make a ...
2
votes
2answers
399 views

Merge lines with the same 'name' attribute on QGIS?

I have a shapefile with a few thousand lines, each is a street segment. I'd like to merge all features with the same 'streetName' attribute into a single attribute. I only really care about the name ...
3
votes
2answers
368 views

Why does ArcGIS Server not return data when querying joined fields?

I've been trying to help troubleshoot an issue that is very strange, and I think we've boiled it down to an issue with ArcGIS Server. We have a map service that shows up in the services directory as: ...
1
vote
1answer
26 views

Why do I suddenly get 'ERROR' as elements in my attribute table after doing a query in QGIS?

I was looking at an .osm file in QGIS using the OSM plugin; I was specifically looking at a country's lines layer. When I checked the attribute table just after opening the .osm, everything looked ...
2
votes
1answer
209 views

How can you tell if a RDBMS is an ArcSDE Geodatabase?

I want to know if there is any way I can query the RDBMS to determine whether it is an ArcSDE Geodatabase, or if I have to do it through ArcObjects. I am wondering if it would be enough to check if ...
0
votes
1answer
106 views

Spatial query without spatial database module

I have the following scenario: Oracle database without the space module. Application in JEE2 with the following architecture: -- Entity -- Persistence (DAO / JPA + JDBC) -- Business (BC) -- Vision ...
1
vote
2answers
250 views

How to speed up spatialite-query using spatialindex?

I have got 2 tables, one of type LineLayer called strlayer, the other one is a PolygonLayer called blayer. The LineLayer contains two rows called fromBland and toBland that should be filled with an ...
1
vote
0answers
151 views

ArcObjects: How to Speedup Spatial Query to Feature Layer?

I have ROAD (POLYLINE) Shape File with more than 400,000 Records. I am working on a code which goes like this: Loop through all Feature of the Shape File Take First Feature Find the LAST VERTEX of ...
0
votes
2answers
143 views

oracle search against intersect of a region that covers the whole world doesnt 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 ...
0
votes
1answer
375 views

A couple GeoExplorer questions

I just started working with the OpenGeo Suite. I'd really like to use it for a County web map, but have a couple questions... 1) Is there a way to add a lat/lon or other X/Y location to the URL and ...
2
votes
2answers
219 views

Select by Attributes - If string has a letter

I'm running ArcMap 10.1. I'm using a File Geodatabase. I have a string coordinate field that I want to clean and some records have letters in it (mostly 'N' or 'E' or 'n' or 'e' e.g. '6213210N' or ...