Questions tagged [query]

A command used to retrieve information from a database

Filter by
Sorted by
Tagged with
1
vote
1answer
34 views

Sort and create attribute field to the shapefile

I am creating a shapefile layer and adding an 'Area' attribute field using the following script: # Create shapefile layer drv = ogr.GetDriverByName("ESRI Shapefile") dst_ds = drv.CreateDataSource(...
-1
votes
0answers
14 views

Getting features from a feature server using C# in unity [closed]

I'm making a game using unity game engine. I'm trying to get some features published on a feature server using C#. I've installed the .NET runtime SDK for .NET and installed the NugetPackage related ...
0
votes
0answers
21 views

Selecting value and range within that value using ArcMap [closed]

If I have 3 column 1 is road name, the second is start mileage, and the third is end mileage. Is it possible to run a query where you would select the road name and mileage within that roadname? ex....
0
votes
0answers
22 views

How to get geometries from this query

Im struggling with this SQL query, from Measure collected polygons in Geometry Generator, avoiding extra texts from multipart polygons. It used to work OK sometimes in some datasets; throw errors on ...
1
vote
1answer
30 views

Accessing PostGIS geometry with psycopg2

I've a PostGIS database loaded with several tables filled with shapefiles. I'm using psycopg2 to access everything via python. I'm able to access the table names with the below query: """SELECT ...
1
vote
1answer
29 views

QGIS - Execute SQL Failure

I've written an SQL query which works in the query section of the QGIS DB Manager. SELECT Max(S_order), SegmentID, S_Order, Length, Buff_Segme, Buff_Order, Buff_Lengt, Buff_Uniqu FROM "...
2
votes
2answers
28 views

Overpass API query: Get streets in city limited to a particular country

I am working with a self-installed version of the Overpass API. I need to be able to query all street names in a particular city, Inverness in the United Kingdom (GB). There is also a city called ...
1
vote
1answer
22 views

Cleaning SQL queries [closed]

I have a bit of SQL code that look similar to this: SELECT sum(case when latitude = '0' then 1 else 0 end) as count_zero, sum(case when latitude is NULL then 1 else 0 end) as count_null, sum((case ...
1
vote
1answer
32 views

Selecting more than one country to be highlighted

I can get a one country within a world shapefile to highlight, but when it comes to adding additional countries this just turns all countries back on I am using query builder to achieve highlighting ...
2
votes
1answer
66 views

OSM + PostgreSQL Queries

I'm newbie to PostGIS and am looking for some SQL examples for better understanding. I didn't understand how do I manipulate the tables, how objects relate one to another. An example: There is this ...
0
votes
0answers
13 views

Pulling road centerlines and parcel boundaries for specific county and exporting them to DXF file using QGIS

I am very new to QGIS. I want to pull road centerlines and parcel boundaries for a specific county, and export them to a DXF file. I need to have Road names included. I have found the data I ...
0
votes
3answers
40 views

Is it possible to dynamically construct the SQL query where clause in ArcGIS layer based on the URL parameters?

I have an ArcGIS layer published to my local server at: https://baseURL/myMapServer/0 I want to dynamically construct the query where clause for this layer based on the URL. For example: https://...
0
votes
1answer
39 views

QGIS Select by Expression Parser Errors

My goal is to select all of the features in a layer with certain names. I have a list of 86 Subdivision names and a I am using a county Subdivision dataset, the names in the dataset include the ...
1
vote
0answers
30 views

Spatialite queries not loading entirely on canvas

I connected a SQLite database to my QGIS project. I wrote a query in the DB manager whose result contains 261 elements. Then, I tried to load the result on the canvas (from the load button at the ...
0
votes
1answer
25 views

Querying Landsat 8 night images in Google Earth Engine? [duplicate]

Apparently, Landsat 8 occasionally acquires images at night-time during ascending passes. However, in the Google Earth Engine data catalogue (https://developers.google.com/earth-engine/datasets/...
2
votes
0answers
36 views

selection expression to display the first 5 rows only in QGIS 3.8.3 [closed]

I would like to display the first 5 rows only in QGIS 3.8.3 from the attribute table of a layer in ascending order. I tried many selection expressions, but, none of them seems to work. Is it ...
2
votes
1answer
39 views

Match by location and attribute in QGIS?

I have 2 different layers. One layer is the field layer which contains field agronomic data, name, variety, etc. The other layer is a layer with about 2000 polygons. Each polygon is tied to a ...
2
votes
1answer
35 views

Identifying layers under cursor in QGIS?

In QGIS 3.8, I've loaded hundreds of layers (georeferenced individual images), which are named by filename. I'm looking for a way to click on the map and query what image (i.e. what layer in the "...
0
votes
2answers
67 views

ArcGIS JavaScript 3.3 add ArcGIS REST API Queried Feature Layer URL as Layer

Using the Query Generator on an ArcGIS REST Feature Layer, I generated a URL that filters the data by a geometry extent ({xmin: -104, ymin: 35.6, xmax: -94.32, ymax: 41}) This returns Current River ...
2
votes
1answer
81 views

QGIS- What is the meaning of the Query Builder operators?

I am learning to filter my data, and I understand how to use the basic operators (e.g. =, OR, AND, !=, less than, more than etc) however there are some operators that are less obvious. What do the ...
1
vote
1answer
42 views

Speeding up PostgreSQL UPDATE query?

I have a query running as below: UPDATE datasets.riverside_houses SET easting = addressbase.x_coordinate FROM datasets.addressbase WHERE addressbase.building_number = riverside_houses.house_number OR ...
3
votes
2answers
78 views

Customize QGIS interface

I'm writing here to ask some questions for a thesis project. My ideas are confused, but I'll try to be clear. I have a GIS project that represents some historical goods in a region. Each good has ...
2
votes
0answers
38 views

Getting distance between point and line with specific values?

I have a table named "housenumbers" that contains points with addresses fields, and one of them is "street_name". And I also have another table named "streets", that contains lines that are the ...
0
votes
0answers
22 views

Using Boolean operator in ArcGIS Pro [duplicate]

I have 2 datasets: Dataset1: raster = 6 classes of land use: water, forest, urban, agriculture, etc. Dataset 2: raster = 3 classes of risks: 1: low , 2: medium, 3: high What Boolean (logic) operator ...
0
votes
0answers
23 views

Using QGIS Queries With ArcGIS Server FeatureServer

I am trying to load USGS Transportation Vector Data from the US National Map data set. REST Link: https://carto.nationalmap.gov/arcgis/rest/services/transportation/MapServer If I use the feature ...
0
votes
1answer
165 views

Use single sign-on username in Web AppBuilder filter widget?

I have an Portal web map: Details: The map has a Web AppBuilder filter widget It uses single sign-on (SSO) authentication The map has a work order layer that is integrated from a Workorder ...
0
votes
0answers
20 views

How could I put drawing info in JSON file when I am creating query via ArcGIS?

I need GeoJSON file in order to use in qlik view. I am using ArcGIS map server and I created a query. But in my JSON File there are not the information related to drawing inf and I don't know which is ...
4
votes
1answer
72 views

Find nearby points in space and time

I have a table that has an ID, point geometry and time. It's basically GPS coords and some other data. I want to be able to select all rows that interact (come close in space and time) to my target ID....
0
votes
0answers
27 views

Return URL of a query on a feature layer using arcgis API

I am familiarizing myself with the arcgis API for Python, and I would like to view the query I perform on a feature layer as a URL: from arcgis.features import FeatureLayer from arcgis.geometry ...
2
votes
1answer
51 views

Changing color of columns names in query builder

Does anybody know if it is possible to change the colors of the names of the columns (attributes) when writing a query in QGIS? (e.g. when selecting by expression in the attributes table).
0
votes
1answer
50 views

Query to intersect polygons in PostGIS with points in MongoDB

Question: Is it possible to intersect geometries from No-SQL and SQL databases? Background: I need to delete the polygons from a PostGIS database that intersects with points (Lat/Long) in a MongoDB. ...
1
vote
1answer
25 views

Create Query either using Select by Attributes or Python [closed]

I am working on something for my job, where I have a list of water/sewer service customers. Some customers have one service or the other, while others have both which is stored as two separate entries....
2
votes
1answer
68 views

PostGIS query from three tables

I am new in PostGIS and want to learn. I faced the query where I have to find one point in two different layers or table. I created a query like this but it is not giving the desired result: SELECT b....
2
votes
0answers
57 views

MapServer Query Raster for Pixel Value at Point

I am working with a MapServer and a map file that is displaying a color-relief image. LAYER NAME "sum" DATA "sum.vrt" TYPE RASTER STATUS ...
1
vote
2answers
66 views

PostGIS: nearest neighbour computation error “No space left on device”

I have two tables: Table_1 and Table_2. Table_1 has 926019 rows. Table_2 has 3089 rows. I want to update a field of Table_1 with the distance to the closest item from Table_2. Here is my query: ...
0
votes
0answers
94 views

Query returning multiple vehicle_ids when it should only return the top 1

Using ArcGIS Desktop 10.5.1 I have a point featureclass in an Microsoft SQL Server 2012 Enterprise Geodatabase (ArcGIS Server 10.5) that holds MDS (mobility ride share scooter) data. The feature ...
2
votes
1answer
47 views

Combining two conditions in one filter expression

I have a Shapefile that shows local municipalities and ward boundaries for South Africa. I would like to filter this layer to only show the wards I am interested in. For example, my first query finds ...
0
votes
1answer
139 views

Quering out multiple values in MapInfo SQL Query

I am trying to filter out around 1000 rows and delete them in MapInfo as they are no longer required in the data set. If there was a smaller quantity then I would use an SQL Query but it has its ...
0
votes
1answer
40 views

Dataframe data handling or SQL Query in ArcMap

I'm trying to perform an SQL query in ArcMap with the following data set, and I have not been able to solve the problem. The idea is to keep all the information of the columns, but for example if the ...
2
votes
1answer
42 views

Filtering fields from a PostgresSQL/PostGIS database layer in QGIS by Query builder

I incurring in an error while trying to make the following filter of fields in the layer properties Query builder in QGIS 3 from a PostGIS database. select "field_A", "field_B2", "field_D" from ...
2
votes
1answer
46 views

Query land use (Raster calculator)

I have a land use raster file and am trying to use the raster calculator to query the file for surface water. The saga formula (11 = surface water band): (a, 11) This does not work. Can anyone ...
1
vote
1answer
93 views

How to make query of MySQL connection in QGIS?

i have added a connection with a MySQL database in QGIS (Add vector layer - Database - MySQL). Is there an option to make a query over the database in QGIS?
1
vote
3answers
253 views

Extracting single boundary from multipolygon in PostGIS

I am trying to find a single external boundary either polygon or line from the multipolygon using st_boundary in PostGIS query. The function doesn't work. What could be the issue?
4
votes
1answer
122 views

QGIS: Select point(s) in other layer with similar datetime value from selection

For the interpretation of bird observations, I need to identify the position on a GPS-track (gpx-files), from which the position of a bird observation (other gpx-waypoint layer) was recorded. The ...
0
votes
1answer
80 views

Constructing query to return values from all polygons that line passes through using SpatiaLite? [closed]

I want an SQL query in Spatialite to return a list of values (Primary Key in this case, but could be any value) from all the polygons which are crossed by a line. Say, for example, a footpath passes ...
-1
votes
1answer
32 views

Using Field Calculator for subtracting values with same ID in ArcPy? [closed]

I have a line shapefile that used for some calculation. One of the calculation is subtracting values with a same group ID. The shapefile has a filed called LineID that consists of 2 lines with Side 1 ...
0
votes
0answers
27 views

How to determine shifting intersections of polygons using MapInfo SQL?

I'm looking for a Mapinfo SQL which can look at two tables and easily determine if a particular smaller bounded polygon has now moved into a different larger bounded polygon because there has been ...
2
votes
2answers
387 views

SQL Query not selecting all points that it should?

I am working on a map of 60+ monitoring wells and I plotted them through an excel data sheet and a few tools. In that data sheet, I have Benzene concentrations associated with almost each point. I ...
1
vote
1answer
30 views

Finding Rows Inside other Rows

So I have database with which I want to do the following: Find out which other rows are contained within the geometry of the row in question. To keep it simple, I am finding the envelope/bbox of the ...
0
votes
1answer
22 views

Counting (Multi)Polygons Within (Multi)Polygons on same Table

So I have a table with approximately 10k rows, with each row having its corresponding geometry entry. What I am attempting to do is count how many row geometries are contained/within the geometry of a ...