A command used to retrieve information from a database

learn more… | top users | synonyms

3
votes
1answer
70 views

PostGIS crosstab on multiple point tables

I have several point tabels, lets say 3. Tables are alike with two columns: a integer value and a geometry like: table sand1 (value int, geom geometry) table sand2 (value int, geom geometry) table ...
2
votes
1answer
47 views

Using function to query text field in ArcGIS Select By Attributes?

I can do this: And get result: On the other hand, when I do this: I get an error message: Why query using function is working on numeric field and is not working on text in both shapefile ...
1
vote
0answers
11 views

Wfs altimetric curves that intersect geometry?

I have a wfs with altimetric curves and i would like to perform a spatial query, i would like to load from wfs only curves that intersect or overlaps a geometry from a shp,so only curves of a specific ...
4
votes
1answer
29 views

Filter a range number in Query Builder of QGIS 2.8.6

I need to filter features that have attributes that start within a relative number range. I am using brackets to filter the range of numbers, but it does not work me. This is my query: CASE WHEN ...
4
votes
1answer
46 views

Change entire label style after certain extent

I need to design a dynamic label in ArcMap that changes its entire style after a certain zoom extent. The research I've done suggests to me that there is currently no way to use VBscript to manipulate ...
1
vote
1answer
35 views

Recurring SQL Expression Parsing Error on Query Builder

I am using Query Builder in QGIS 2.14.2-Essen to select one country (Peru) among 237 for which to show two layers (states_provinces, boundary lines) from the Natural Earth database. I am paying close ...
0
votes
2answers
31 views

Proper handling in PostgreSQL/PostGIS only after many queries?

I am trying to analyze GPS data of a parade on a fixed route with a certain variance due to the urban surrounding (canyoning). I'd like to project the GPS waypoints to the nearest points on the route ...
1
vote
0answers
22 views

How to get all pixel values of raster within a GeoJSON FeatureCollection in PostGIS

I need to extract all pixel values in a raster within a GeoJSON mask, using ST_Intersects. Attempt (throws invalid GeoJson representation): select row_to_json(t) from (select * from table_name where ...
3
votes
2answers
42 views

Search for textbits in QGIS

Is there a way to search for only parts of text in QGIS. Imagine I have a field in my attributetable called myField and I have several entries there, something like This is awesome Even more awesome ...
1
vote
1answer
23 views

How to get the geometry of all tables in a postgresql database?

How can I return all tables geom?
1
vote
0answers
22 views

How to pass time dimension to postgis DB layer WHERE clause in Geoserver?

I have successfully configured a layer with time dimension that is backed by an SQL query to a PostGIS DB. I can query it through WMS, but I just can't find a way to pass the start and end time to the ...
1
vote
0answers
24 views

Selecting cells with values from DEM those are above specific value corresponding to each polygon?

i have a shapefile with 2000 polygons and a DEM. i want to calculate zonal mean for each polygon considering values from DEM which are above a particular value for each polygon. i want to it with ...
2
votes
1answer
55 views

Changing Query Layer's SQL Expression with Python

I use query layers in ArcMap 10.4. The maps need to be done/repeated periodically. The easiest way is to copy the map, change the source's SQL expression (e.g. from select * from TABLE where Period = ...
0
votes
0answers
32 views

How can I determine an appropriate query based on a join?

I am having trouble coming up with a query that will show the 12 states total population percentage in ArcMap 10.4. I created the spreadsheet below and I have already joined my excel to the states ...
0
votes
1answer
28 views

Search widget expression

I am trying to migrate my Flex eSearch widget to the CMV Search widget. The query is not working. What can I do to make it work? Flex query: <value prompt="Example: MN or ...
1
vote
2answers
55 views

Calculate area parts of polygon intersections

I have a problem of calculating area sizes of intersected polygons in postgis. I would represent the problem in an example (please see the picture). I have a gridsquare table with some attributes like ...
3
votes
1answer
23 views

QGIS: Error message in query builder

I am using QGIS version 2.14.1 (Essen) and trying to update data in my table using field calculator. I am inputing the following statement: update "table_1" set "table_1" ='y' where "table_2" ...
1
vote
2answers
45 views

How to specify two different and separate conditions in query builder?

For example, I have a table containing well log data for multiple operable units. I would like to make a query outputting a table where Operable unit=001 OR 002, AND Formation= Residuum. I would ...
0
votes
0answers
13 views

How can I create a definition query to show the next 5 years of data, based on a text field with the year on a joined table in SDE?

I need to show the next 5 years of construction data, but I want it to automatically update what is shown based on a text field called ConYearStartNbr that shows when the construction is set to start ...
2
votes
1answer
85 views

SQL / Select by Attributes query for “does not include text found in another specified field”

I'm using ArcMap 10.2 and I'd like to write a query to select features where Field A does not include text found in Field B. Specifically, Field A contains street numbers and street names. Field B ...
0
votes
0answers
47 views

Accessing array of x,y coordinates stored as MDSYS.SDO_GEOMETRY / PUBLIC.SDO_GEOMETRY attribute in Oracle 11g?

I am totally new to GIS. I am working with a table in an Oracle 11g database. In each row of this table there are two attributes of interest: one is of type MDSYS.SDO_GEOMETRY and the other ...
1
vote
2answers
47 views

Using PostGIS to query shape files

I am very new to PostGIS (started using it this morning). My goal is to determine if a lat/long point is contained inside a polygon that is described in a shape file (The shape file has a single ...
0
votes
1answer
43 views

how to skip creating an empty feature class using featureclass to featureclass in arcpy

I have a script that finds points outside of selected areas and creates a feature class in a file geodatabase. However, sometimes there are no points outside of the selected area. Currently, the ...
1
vote
1answer
44 views

Use spatial queries on multiple layers in QGIS

Is there a way to perform spatial queries on multiple layers in QGIS without going through an external database? I would like to perform SQL-like queries on layers imported in QGIS directly, but can't ...
1
vote
0answers
27 views

Testing Oracle query produces valid results in QGIS Python Console

I have a query that searches an Oracle database using a where clause to get the geometry of an object and then zooms to the extent of that object. The value for the where clause is retrieved from a ...
1
vote
2answers
72 views

How to add state polygon information to a city point?

I have the following layers: Country border federal state borders cities (located as points) I would need the following result file (txt or csv..): A column with the name of the city and another ...
5
votes
1answer
185 views

How to build a query/expression to select specific points within a buffer? (in QGIS)

I have a point layer in QGIS. Each point represents a tree and each tree has information about its height as an attribute. I would like to build a query/expression to select all those trees that have ...
1
vote
1answer
63 views

query.where statement using date range in JS API fails with IE 11 but works fine with Chrome and Firefox

My aim to display point data from a feature layer on ArcGIS for JS map interface. I am successful doing so in Chrome and Firefox, however when I include date in a where condition of a query execute it ...
3
votes
2answers
181 views

Selecting more than 1,000 features from AGOL hosted feature service?

When data from a cloud-hosted feature service is loaded into ArcMap, it queries the first 1,000 features "to enhance performance"... I, however, need to see all the features. How can I add all ...
3
votes
1answer
113 views

Distance in meters between two geographic coordinates

I want to determine the distance in meters between two geographic coordinates. The points are: Lat (deg) Lon (deg) A: -33.3930906 -70.5452765 B: -33.3993212 -70.5468767 So if i calc the ...
0
votes
1answer
52 views

How can I add a new layer, then remove previous layer from a Leaflet/CartdoDB map without the map clearing everything

I am new to CartoDB/Leaflet. Here's my fiddle... http://jsfiddle.net/zippyferguson/fLkqgf4q/1/ If you click the play button, I want it to load data to the map year by year from 1966 to 2015 from a ...
0
votes
1answer
61 views

Arc 10.2.2 crashes when adding query layer?

I'm trying to add a query layer from an Oracle database into a blank 10.2.2. map. I enter the query, validate, finish, and the software thinks for a second and then just winks out. No error ...
1
vote
1answer
58 views

Creating a menu interface to update an sde feature class in ArcMap using arcpy?

I work in electrical utilities and we have stacks of paper records that need to be updated into an existing SDE feature class attribute table. My problem is that someone in the city's GIS office would ...
1
vote
1answer
63 views

Making table from MySQL query with ArcPy?

I am trying to interact directly with data from a MySQL database in ArcMap using Python. So far, I have successfully connected the database using the MySQLdb.connect() function and have successfully ...
2
votes
1answer
55 views

QGIS and intersections

I have MultiLineString geometry data from an ESRI shapefile. I also have a polygon (region) that I have created in QGIS using the drawing tools. When I attempt to find the intersection between the ...
1
vote
1answer
69 views

Postgis/SpatiaLite SQL query to connect MySQL, Access or Oracle database

In SpatiaLite or Postgis, how can one create a SQL query to read a table from a MySql or Oracle database? I don't know **the correct SQL syntax to connect to a table in a MySql or Oracle database ...
1
vote
0answers
32 views

Shape comparison language (SCL) - get shapes which intersect extent border

I am trying to write a SCL string for my ArcGIS query, which should return only shapes which are intersected by a border of a rectangular shape (extent). So far the closest I've got is the following: ...
0
votes
3answers
112 views

Pass GeoJSON from .NET to Javascript

My .NET/OpenLayers/GeoServer/PostGres-PostGIS application allows users to create custom queries to get data from my PostGIS tables. The queries are called in .NET (not javascript) using a web method ...
1
vote
1answer
148 views

PostGIS Query To OpenLayers

I am trying to get data from a PostGIS datatable using .NET, pass it to javascript, create a layer in OpenLayers and add the PostGIS data to the layer. I can successfully query from the ...
1
vote
1answer
84 views

How to make a SQL query that would sum multiple records in ArcGIS?

I've got a large file geodatabase that contains a polyline feature class of water-pipes. The feature class have many fields, but the ones that I'm interested in is that of the water-pipe's Length and ...
3
votes
2answers
78 views

Copy/convert selection into filter/query builder of QGIS?

Can anyone tell me if it is possible (and how) to convert or copy a selection on a layer (that has not been created through "select by expression", but instead by irregular selections from a canvas, ...
1
vote
0answers
37 views

Find points within X distance with a specific variable

I am trying to use QGIS to find points within 5 meters of each other that all have a value of <50% for a given parameter that has been loaded through a CSV file. I looked in to doing it with a ...
1
vote
0answers
36 views

Overpass output city name instead of coordinates?

I did a query to look for certain things. However it only outputs the lat and long coordinates, there is no city data available. I'd like to have the city it belongs to / closest city though. I know ...
2
votes
2answers
90 views

Count Distinct with Where clause in OGR

I am looking to run a query in OGR to write back all instances where there is only one record of an attribute. I was thinking that I would use the following: ogrinfo -dialect sqlite -sql "SELECT ...
5
votes
1answer
216 views

ESRI Javascript FeatureLayer Select by Attributes

I am trying to select a group of features in an ESRI javascript API featureLayer by attribute. The call errors out. My code is as follows. Here is the layer definition: var fieldDefs = [{ ...
1
vote
1answer
51 views

Delete polygonal features in one layer outside polygon feature of another layer in PostGIS

For deleting polygonal features in one layer (~1000000 features) outside polygon feature of another layer (one feature) in PostGIS I use query: DELETE FROM layer WHERE layer.id IN (SELECT a.id FROM ...
0
votes
0answers
63 views

Publish postgis raster based on column value in geoserver

I have a postgis raster table with the following columns: rid, rast, year, plant I created a wms layer in geoserver pointing to the table and successfully serve out the raster when the table only has ...
0
votes
0answers
65 views

Overpass-API Ability to download the nodes and ways that intersect the ways of one relation

i am trying to do a query that will detect if a node or way that is included in a relation is also referenced by other ways,nodes or relations. Not sure if this is possbile, i had tried to do this ...
1
vote
1answer
96 views

Dojo Promise/All Array Not Populating InfoTemplate in ArcGIS Javascript

Using dojo/promise/all I'm attempting to populate an infoTemplate with results from a queryTask which runs later in the script. Our app returns an XY value from a geocoded address search and queries ...
1
vote
0answers
26 views

How to show neighboring polygons and polygon in which point exists

We have a table which has polygon related data stored. For finding if a point (long,lat) is within that polygon I am using following query in mysql SET @vasantKunjSectorC = 'polygon((77.161266 ...