A command used to retrieve information from a database

learn more… | top users | synonyms

0
votes
1answer
19 views

Setting the Geometry with sql query

I am trying to merge data from a U.S. states shapefile with data on each state. I used this SQL query which is supposed to work: SELECT * FROM child_poverty_by_state UPDATE child_poverty_by_state ...
0
votes
1answer
24 views

Querying Arcgis file geodatabase from sql

I need to compare data in a sql db with data stored in an arcgis file geodatabase. I'm not interested in the spatial attributes, only the added text attributes. What's the easiest way to do this? I ...
3
votes
1answer
50 views

Is it possible to use comments in QGIS Query Builder?

I am trying different queries in the Query Builder. Is there a way to comment the query? I tried with /* */ # -- without success : An error occurred when executing the query. The data ...
1
vote
2answers
53 views

Python query to find records with more than one alpha character in a field

Using ArcGIS Desktop 10.2. I have a field in a table of several thousand records. The field is made up of alphanumeric characters. I'd like to perform two queries using python on this field: ...
0
votes
1answer
29 views

Do ArcGIS Online feature services support a DISTINCT or returnOnlyUniqueValues option?

ArcGIS Server REST API has: returnDistinctValues Description: If true, then returns distinct values based on the fields specified in outFields. This parameter applies only if the ...
1
vote
1answer
30 views

How to extend a straight line in postgis?

I have a postgis table of simple linestrings, each one is a straight line with just two points. I want to select every linestring, but extended from both sides by 1 meter. So i have lines, that are ...
0
votes
1answer
24 views

Get CartoDB query by distance to work

Has anyone tried this tutorial: Query by distance ? This is a copy of the final code which they use for the map: <html> <head> <link rel="stylesheet" ...
2
votes
1answer
27 views

How do you create a query that will result with the adjacent parcels?

I have a shapefile with parcel data, and I am trying to create a query that will render a list or something similar that will list adjacent parcels to a specific parcel. I want to be able to select ...
0
votes
0answers
30 views

Query's “Get Unique Values” includes case variants that don't exist in attribute table

I ran a query on an ArcSDE 10.2 Feature Class to find features that do not follow our office's standard of being in uppercase. The "Get Unique Values" seems to return values that do not exist in the ...
0
votes
1answer
17 views

How to export query result on raster table in PostGIS

I did success query on a raster table in postGIS(raster data clipped by a vector polygon), now I want to view the query result in QGIS. But how to export the query result to another table. In vector ...
0
votes
3answers
45 views

postgis insert query to store geometry and other data

I'm using Postgis functions st_dump and st_split to split a polygon based on line. Now, after splitting; output geometry stores in a database table as well. Here is the query: insert into aoo(geom) ...
0
votes
1answer
29 views

PostGIS Group By Error [closed]

I am performing a pretty simple query in PostGIS 2.1.1 from within QGIS 2.2 for Windows (using the DB Manager plugin). I have a table with many columns and I am trying to perform a Group By function. ...
0
votes
0answers
18 views

Join Standalone Tables from ArcGIS Server in Javascript API

I am trying to find a way to execute the equivalent of the following query with the ArcGIS JavaScript API (I made field and table names generic): SELECT a.field1, a.field2 FROM table1 a, table2 b ...
2
votes
2answers
34 views

How to download only selected attributes using Overpass turbo?

does anyone know of a query to download select attributes using Overpass turbo? I am trying to download very granular road dataset for an entire country, but I only want a few columns. Thanks!
0
votes
0answers
26 views

The difference when querying raster and vector

Hi everyone I have two queries have the same meaning but different results. Why is there a difference?. Queries are true? query 1: query 2:
0
votes
1answer
35 views

Extract address data / Query point in administrative boundary

I try to create a DB in postgreSQL with all the postal adress data for a specific country. Actually I have this table full of data: id integer NOT NULL DEFAULT nextval('plz_id_seq'::regclass), ...
0
votes
0answers
26 views

pgrouting pgr_drivingdistance() query gives inconsistent results

So I have been working on a query(with the help of other stackexchangers :)) to get the edges in an isochrone from a particular point and then update the count_events field of those edges by some ...
0
votes
2answers
37 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
71 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
75 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
94 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
76 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
182 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 ...
0
votes
1answer
67 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
91 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 ...
11
votes
0answers
247 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
123 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
46 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
32 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
31 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
44 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
67 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
41 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
315 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
35 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
42 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
81 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
32 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
24 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
121 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
15 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
87 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
38 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
42 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
60 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
58 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
34 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
59 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
49 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
253 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 ...