Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
3 votes
1 answer
497 views

Query for ST_Geometry line vertices via a recursive SQL WITH clause?

I'm exploring ways to get ST_Geometry line vertices as individual rows in a query resultset (via Oracle SQL). The reason being, ST_Geometry doesn't have a GetVertices function (see ESRI idea here). ...
1 vote
1 answer
493 views

Representing a route that doubles back on itself in BigQuery with a LineString

I'm trying to represent routes in BigQuery, but running into issues for routes that double back on themselves. Consider the following LineString that proceeds from the southwest to the northeast of ...
3 votes
1 answer
913 views

Adding more parameters to the SQL file created by raster2pgsql

I'm using raster2pgsql to upload rasters to a PostgreSQL database I execute the following command in cmd to create an SQL that will add the raster: "C:/Program Files/PostgreSQL/9.5/bin/...
0 votes
1 answer
73 views

Summing up values of polygons within bigger polygon in QGIS

I have buildings as polygons with a lot of data in the attribute table. My goal is, to sum up the values selected for a table column of all building polygons within the building blocks (here in purple)...
0 votes
1 answer
657 views

Geo search MySQL table for rows that are within proximity

I have an sql table that has some data on retail locations with lat, long coordinates. My application queries the table to pull the data using python. Here's some sample data: table1 id name lat ...
2 votes
1 answer
696 views

Creating Bounding box on pgr_Dijkstra to make it faster

I have a problem with the Dijkstra algorithm in regards to the query speed. My current php script for the query is looking like this: $sql = "SELECT * FROM pgr_dijkstra( 'SELECT id, ...
1 vote
1 answer
549 views

Automatically running an ST_AsText query over multiple rows in QGIS

After my SpatiaLite database got corrupted, I used a recovery tool to recover what was lost. I now do have the database, but I can't visualise the features on a map. I figured out that with SELECT ...
2 votes
1 answer
84 views

Creating autoincremental ID for groups in QGIS

I have an attribute table containing information about area, region, and samples. The table structure resembles the example shown below: My goal is to automate the generation of "ID"s when ...
5 votes
1 answer
342 views

Aggregating multiple rasters within a polygon in PostGIS

I have several raster tables in PostGIS (four in fact but in this case let us assume there are just two) - same cell sizes, same alignment but with different types of value (e.g 3d_pot, 3d_area). ...
2 votes
3 answers
317 views

Generate sql WHERE clause from selected features

In ArcGIS Desktop, I can use various tools to interactively select features. These selection tools are handy for making complex selections (tabular or spatial) that would be otherwise cumbersome to ...
3 votes
1 answer
468 views

How to get the intermediate points between a route origin and destination?

I use Redshift and recently Amazon Redshift has updated the database to be able to use some spatial functions. https://docs.aws.amazon.com/redshift/latest/dg/geospatial-functions.html In a table I ...
2 votes
1 answer
700 views

How to find a nearest line to a point [closed]

I have a table with many points that need to be associated with street segments to calculate an average value. should I do a relationship for all points to a street segment that is closest. I have ...
0 votes
1 answer
2k views

Intersect points with polygons using SQL Server query from ArcGIS Enterprise Geodatabase

I have 2 databases in ArcGIS Enterprise Geodatabase in SQL Server. One database (DB_A) contains a feature class with points and the other database (DB_B) contains a feature class with polygons. I'd ...
0 votes
0 answers
13 views

GeoNetwork : Extract Organisation names defined for all records

With GeoNetwork, I have more 2000 records into the catalog. I need to extract all values currently defined for the Organisation names. With pgAdmin, I have success in querying without error message : ...
0 votes
1 answer
263 views

Hiding/Displaying dashboard content (tiles) based on user or group logging in using ArcGIS JavaScript API

I want to know if it is possible to either hide or display the content of an Esri webapp, dashboard, or experience (tiles, widgets, data layers, filters) depending on which Portal user is accessing ...
3 votes
1 answer
1k views

Get domain descriptions for multiple fields using SQL

How can I get domain descriptions for multiple fields using SQL? I have successfully used the Oracle SQL in this ESRI document: Resolving domain codes to description values using SQL. But how do I do ...
0 votes
3 answers
730 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
1 answer
2k views

Converting a WKT column to type Geom

I have the following table in my MariaDB database: This table contains a column called 'coordinates' (type: LONGTEXT) with a wkt representation of either a MultiPolygon or a Polygon. I am attempting ...
3 votes
2 answers
658 views

Create multiple callout lines from a single label

I would like to label groups of points (clusters) with only one label but several call-out lines. I built on top of the very appealing answer from @eurojam here: Giving one label to two points using ...
1 vote
1 answer
461 views

FME: SQLExecutor [PostGIS Format] ST_Intersects() Not Recognized

Scenario: [A] 5,784 polygon geometries + [B] 2,100,000 address points Source Format: [A] GDB Feature Class, [B] PostGIS Table Goal: Find which address points [B] intersect with polygon geometries [A] ...
1 vote
1 answer
44 views

QGIS expression to symbolise road condition between values

I am using QGIS 3.22.16. I try to symbolize a road condition. The result wanted is: Equal 2 if Minor > 0.3 Moderate > 0.2 severe > 0.1 Equal 1 if 0.2 < Minor <0.3 0.1 < Moderate <...
2 votes
1 answer
94 views

Grouping points within counties and symbolizing their data as pie charts in QGIS

I need to combine/categorize points within different polygons while retaining some of their values. I've made up a scenario to try and simplify my problem. The layers I have to work with are: a point ...
0 votes
1 answer
72 views

SqlGeometry STBuffer producing abnormal polygon shape

I am currently not able to figure out what is causing the abnormal shape when drawing a polygon onto the map as shown below. Instead of being a complete polygon, there seems to be a triangle in the ...
7 votes
1 answer
2k views

Automatically Snapping Points to Closest Part of Line

I have some line points representing manholes. I also have line features representing roads. Both of these features are currently living in a PostGIS database. I'd like to automatically move these ...
1 vote
1 answer
1k views

T-SQL convert a string to geometry data type

I want to convert a string to geometry data type using the following statement: ALTER TABLE tablename ALTER COLUMN geometrie TYPE geometry(Point) USING st_astext(geometrie); I get error: Msg 102, ...
0 votes
0 answers
17 views

How to change an ogr2ogr KML Placemark Name?

If I use ogr2ogr -f LIBKML m32540000.parcel.kml ../../3254.kml -ct \ '+proj=affine +xoff=-.00005 +yoff=-0.00004' \ -nln land -clipdst mChopper.kml -clipdstlayer mChopper \ -clipdstwhere "Name = '...
2 votes
2 answers
1k views

How to use spatial indexes in SQL queries made on geopackages

I'm trying to learn how to write geopackage SQL queries so that the r tree index is used, but I can't seem to find any good information. I'm just trying to write a simple query in the qgis db manager ...
1 vote
1 answer
1k views

How do you make a GEOMETRYCOLLECTION valid in SSMS?

The following query is used in an app to make shapes valid, however it does not work when using GEOMETRYCOLLECTIONs. I get the following error: A .NET Framework error occurred during execution of user-...
1 vote
1 answer
56 views

Join points into lines, split by a date gap

I have data for the location and dates of a band's gigs as point features. I want to turn these into line features where the lines come from all points in time-order until there's a gap of a given ...
4 votes
2 answers
3k views

Combining ST Buffer and Intersect with Where clause

I'm trying to create a buffer around a single point in a spatial entity and finding all the points from a different entity that fall within that buffer. I tried two approaches. The code below runs ...
4 votes
2 answers
153 views

Update fields in table in PostGIS database by joining attribute by field value from a layer

I have a table in my PostGIS database. Its geometric objects I loaded in to my QGIS project as layer where I can edit them. In this layer (layer A) there are features with null values in some fields. ...
2 votes
1 answer
239 views

Make geographic squares that follow parallels in SQL Server

I have a list of points (with latitude and longitude) in an SQL Server database, and for each of these points I have to generate a 50 x 50 degrees square (the point being the South West angle of the ...
3 votes
2 answers
4k views

Installing PostGIS extension with pgAdmin 4 on MacOS Monterey

I'm currently running into a problem on pgAdmin 4 where I am unable to use the PostGIS extension. I first tried running it this way through PGAdmin 4: DROP EXTENSION IF EXISTS postgis CASCADE; CREATE ...
9 votes
3 answers
6k views

Label points at regular intervals using ArcMap

I'm working with lines on roads represented by a large number of sequential points. Since labeling all of them would make the points impossible to identify, I'd like to know if there is a way to label ...
1 vote
1 answer
5k views

Query syntax to select every multiple of nn record (shapefile) using ArcMap [duplicate]

I have data like multiples of 40. 40 80 120 160 200 and so on. I would like to label every record that is a multiple of 100. I have tried a couple of methods and can't get them to work either as a ...
2 votes
1 answer
837 views

Selecting all tenth in field [duplicate]

I want to select all tenth in a field! :( I know this way; "Km" = 10 or "Km" = 20 ... and so, but I am pretty sure theres other way. I am not SQL literate, but with your help in ...
0 votes
1 answer
225 views

Unauthorized SQL Query Execution warning- ArcGIS map services

A security scan of an application I maintain that uses several ArcGIS 10.7.1 map services (hosted with stand alone ArcGIS Server, not Enterprise, on AWS server, with IIS as web server) produced this ...
5 votes
2 answers
292 views

Problem with ST_Difference in PostGIS

I'm testing various SQL queries to do a seemingly easy ST_Difference in PostGIS. It needs to be done in SQL as I'm testing to later use the query on quite large datasets. Original code I tried: CREATE ...
1 vote
0 answers
48 views

SQL approach to forms layout in QGIS

We're creating GeoPackage to use in QField. In the Attributes Form we have a Category-field where you can choose a value from a look-up table (layer). And a separate field for Sub-Category, which is ...
2 votes
1 answer
396 views

Error when altering a table column using ST_Dump

I user ALTER TABLE to change a Multilinestring geometry column to a Linestrings geometry column with this syntax: ALTER TABLE jalan_diy ALTER COLUMN geom TYPE Geometry(LINESTRING, 4326) USING (...
2 votes
1 answer
70 views

Get position in meters of POI on a polyline

I have a table of POIs which are simple Points I would like to know each time a POI is close to the polyline. I would like to get the number of meters from the start of the polyline each time a POI is ...
1 vote
1 answer
792 views

Select SDE.ST_GEOMETRY as JSON text (using SQL)

I have a multipart M-enabled SDE.ST_GEOMETRY polyline FC (in an Oracle 18c EGDB): Using SQL, I want to select the geometry as JSON text: {"hasM":true,"paths":[[[0,5,0],[10,10,11....
2 votes
2 answers
96 views

QGIS Dynamic filter based on the names of layers visible within a group

I'm not sure if this is even possible in QGIS, but I try to filter features in a layer based on the names of visible layers within a certain group. Example: I have a group holding layers named by ...
0 votes
2 answers
192 views

Performing ST_Distance query in file geodatabase using ArcGIS Pro

I'm trying to create a view in ArcGIS Pro that joins attributes from two feature classes. The features need to be joined by an ID field and by distance. I want the features in the TABLE1_ERASE layer ...
0 votes
1 answer
260 views

MS SQL Server support for spatial joins

I have tried these ways to run a spatial join SELECT * FROM a JOIN b ON GEOMETRY::STWITHIN(a.geom, b.geom) = 1 SELECT * FROM a JOIN b ON a.geom.STWITHIN(b.geom) = 1 Both return the error:...
0 votes
0 answers
69 views

Using UNION ALL with view table

I have table in multiple schemas, the table in all schemas have the same columns number and type so i'm trying to combine all table data into view table using UNION ALL as shown CREATE VIEW "...
1 vote
1 answer
716 views

Extract SDO_GEOMETRY line elements using index position / dot notation

SDO_GEOMETRY; Oracle 18c: Is there a way to extract elements from an SDO_GEOMETRY line using an index position / dot-notation in a SQL query? For example, extract the X coordinate of the second vertex ...
0 votes
1 answer
190 views

How to interpolate a point between two points in Oracle

I have an Oracle database table which stores points of a track of moving objects. object_id geometry timestamp 1 ... 1970-01-01T00:01:00 1 ... 1970-01-01T00:02:00 1 ... 1970-01-01T00:03:00 2 ... ...
2 votes
1 answer
1k views

Creating a Point with SRID - MariaDB

I have a table containing a longitude and latitude (as doubles) in MariaDB. What I'm trying to do is create a point with a specific SRID - 4326. The current way that I create a point is by using the ...
0 votes
2 answers
677 views

Clarification on Oracle sdo_gtype

I need some clarification on oracle sdo_gtype 4402. I understand that sdo_gtype is coded as DLTT: D: Dimension L: linear reference TT: TT identifies the geometry type It's clear to me that first 4 ...

1
2 3 4 5
41