A command used to retrieve information from a database

learn more… | top users | synonyms

1
vote
2answers
128 views

Using Qt Designer to Create a Form in QGIS that can search for a specific point in a layer

Good Day! I would like to ask if you can create a form in Qt Designer to create a form that can search for a point on the map using data that the user will provide such as the Name. I am currently ...
0
votes
0answers
39 views

View for SDE Permissions for SQLServer

Does anyone know the correct tables and joins to write a view to see the permissions on objects in SDE? Here is what I had in 9.3 and it doesn't seem to work (ie., all Permissions are Edit b/c the ...
0
votes
1answer
44 views

ModelBuilder - use in line variable in expression

I have an in line variable of two fields (field1_field2) in modelbuilder. Using the make feature layer tool, I would like to make an expression that queries field2. Can an expression in the make ...
0
votes
0answers
70 views

Invalid spatial reference Error

I am getting the error: Invalid spatial reference. Spatial reference must match map's spatial reference. Clear the map layers collection prior to changing the spatial reference when I try to ...
1
vote
1answer
61 views

Problem with runing a loop in a query in PostGIS

I am new to PostGIS and I have a question which can't solve. I have a table of buildings each having a value for number of people living in it. I would like to calculate the total value (sum of number ...
0
votes
0answers
36 views

display route from database(postgresql) on

For first part: Link i have postgresql9.1,postgis2,pgrouting2 and qgis2.2 this is the second part of what i need to do: Search in a database (postgresql with pgrouting) for a line from public ...
0
votes
0answers
69 views

Why is Freehand Spatial Query in ArcGIS for Server not working?

I have been using the Spacial Query tool from ESRI to implement more functionality into my GIS application. The query works for a square, circle, and oval; but it does not return anything if the user ...
0
votes
0answers
58 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
349 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
55 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
143 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
84 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
49 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
374 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
239 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
61 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
65 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
74 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 ...
8
votes
1answer
238 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
240 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
66 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
753 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
43 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
118 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
453 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
261 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
144 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
284 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
44 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
75 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
115 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
94 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
101 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
117 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
121 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
325 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
446 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
144 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
79 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
128 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
110 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
74 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
700 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
439 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
401 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 ...