Tagged Questions

A command used to retrieve information from a database

learn more… | top users | synonyms

0
votes
2answers
77 views

Keep receiving query error in Flex Viewer for Search Widget in ArcGIS Server

I am not sure what is going wrong, but I keep receiving this query error http://i.imgur.com/XXSpEpH.png Here are the settings for the search widget <?xml version="1.0" ?> ...
0
votes
1answer
272 views

SQL Geometry Query similar to Select by Centroid

Does anyone know if it's possible to query SQL geometry by something like 'centroid of polygon'...similar to ArcMap's select by location? I'm using SQL Server 2008 R2 as the DBMS. I have two polygon ...
0
votes
0answers
89 views

Clipping multiple layers in QGIS 2.2

I have huge amounts of data (multiple country-wide shapefiles) which i have to work with constantly. But working on separate cases i only need a fraction of that data (region, city etc.) Loading the ...
0
votes
1answer
176 views

How to write to Sql server from MapBasic and insert rows

I have created a table in Sql server 2014 with the columns: Id (int), Geom (geometry), RouteId (int), Desc (varchar(MAX)) I have succeeded in making the table mappable through MapInfo I have checked ...
0
votes
0answers
142 views

Java script vehicle tracking application

I am using ArcGIS and Server to build n application to track vehicles via tablet GPS in the vehicles. My original plan was to use a feature class to store point location and then display the most ...
3
votes
1answer
455 views

Problem PostGIS Spatial Query ST_Contains ST_Disjoint ST_Intersects

I'm working on a project with two different tables inside a database. One contains points in a column geometry(Point,4326) type and the second one has a column geometry(MultiPolygon,4326). Now I would ...
1
vote
1answer
215 views

query / filter on attribute tables with external tables joined

i tried to do some queries on joiend table fields ... i've got/found some answers concerning version 1.8 - which result in "use select + export to create a combined dataset" so i just did some tests ...
1
vote
2answers
251 views

Sql Query for percent of buffer filled with objects

Hi I am trying to write a query to find the percentage of a buffer polygon (Called 250_Buffer) that is filled with or contains other polygons in another layer (Called Development) any help that you ...
14
votes
1answer
360 views

How to query OSM for all beaches facing west? - QGIS preferred

I want to identify all beaches on this planet (or a given subset of it) that are facing westwards (+/- 20-30 degrees). My idea is to use OSM as the data source. Extracting all polygons that have the ...
1
vote
2answers
292 views

Searching planet_osm_point by longitude and latitude

I used osm2pgsql to import data into my PostgreSQL database and it put gave me the following 4 tables, planet_osm_point, planet_osm_line, planet_osm_polygon and planet_osm_roads. I have looked at ...
-3
votes
1answer
47 views

Is there a function when using Select by attributes, to select only the continents' annotations?

Annotations beginning with character "C" refers to continents and I want to select only these annotations.
1
vote
1answer
39 views

Keep column titles when exporting SQL query in MapInfo

Is there a way to keep column titles when exporting a query in MapInfo as a csv or a new tab. This is my result: And my export looks like this: It's not a major issue, I jus like saving myself ...
1
vote
1answer
51 views

MakeQueryTable_management

When I run this code, it says "An invalid SQL statement was used". Any idea what does it mean? import arcpy from arcpy import env env.workspace ="C:/RG/Projects/CriticalDataNetwork/CDEC.gdb" try: ...
1
vote
0answers
72 views

How to Build Query Table from two OLE DB tables using ArcPy?

When I run the following code to create a subset of a table, the error says "An invalid SQL statement was used" [Query]. The error shows in line 39. Is there any idea you can figure this out? import ...
0
votes
1answer
80 views

Is it possible to do a query to multiple tables?

I have a point a line and a polygon layer. They have the same attribute table. Can I do one query that refers to all the attribute tables? So I wouldn't have to do every query three times. Thanks. ...
0
votes
0answers
79 views

How do I use Arcpy to label based on two different expressions, then convert to annotation?

I am trying to open an mxd and turn on labels before converting them to annotation. I would like to turn on labels with 2 different classes, based on 2 different expressions, then convert them to 1 ...
0
votes
1answer
738 views

JavaScript API - Query and Edit point from Feature Layer

I am attempting to recreate the ESRI example for attribute inspections (https://developers.arcgis.com/javascript/jssamples/ed_attribute_inspector.html). I am having an issue when I create my feature ...
1
vote
0answers
48 views

Automatically update the result of a QueryTask

I have developed a application using the ESRI JS API to allow users to create and edit features in a web map. I have used the QueryTask to create summary statistics to report back to the user on ...
0
votes
1answer
56 views

Multiple field vbscript query

I'm fairly new to arc gis and I'm trying to string along several queries. individually they work in same query they don't. background I want to query all permit types rc, re, re/ap, and db; less than ...
2
votes
1answer
120 views

Area of polygon split by a line

I need a query that return the area of two polygons that have been split by a line. This is what I did so far: SELECT ST_Area(ST_Split(surface.geom, limite_a.geom)) from surface, limite_a where ...
0
votes
2answers
48 views

How can I optimize this point-linking query?

I have the following query, and am wondering how it could be optimised to run faster: WITH gps_nodes_1 AS ( SELECT "NODE_ID", "geog" FROM gps_nodes WHERE ST_Distance("geog",ST_GeogFromText('POINT( ...
0
votes
0answers
30 views

Problem using test search for tags in ArcGIS JavaScript API

I have the next problem with a query using the ArcGIS Javascript API, when I execute this code: portal.queryItems({ q: queryGroup+' AND tags:"' + tagsInserted+ '" ', num: 100 ...
2
votes
1answer
208 views

ST_Intersects() in WHERE clause misses results

I have a table with a lot of geographical objects like countries, cities or points inside the cities. For instance # SELECT id, ST_AsText(location) FROM brace_brace WHERE id IN (3, 42); id | ...
1
vote
0answers
30 views

Forcing Hash Join Query Plans using PostGIS

I'm currently testing PostGIS 2.0 in a Greenplum Appliance (Postgres 8.2 based) and have hit an incompatibility between PostGIS and the MPP Greenplum environment. The basic query below can't be ...
1
vote
2answers
177 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
43 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
58 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
106 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
67 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
38 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
83 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
84 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
648 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
85 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
216 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
99 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
63 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
534 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
444 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
68 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
76 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
61 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 ...
1
vote
0answers
100 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
324 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
367 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
88 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
49 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
1k 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
55 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
144 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 ...