# Questions tagged [algorithm]

A mathematical procedure used to solve problems with a series of steps. Algorithms are usually encoded as a sequence of computer commands.

113 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
755 views

### Translate Orientation from Sensor data to Geo location

I am tracking a device that might loose GPS signal then and there. And when the GPS signal is too low, I should use the accelerometer and Gyroscope sensors data to guess which way they should have ...
• 231
2k views

### Determining whether polygon crosses the antimeridian

I'm working on a system that uses bounding boxes as a fast first check for a point-in-polygon filter. My current naive implementation (just taking the min/max lat and long for all points) fails on ...
• 336
330 views

### Speeding up execution of PyQGIS algorithms

I don't understand why if I do "manually" some algorithms I get results much faster than when I insert the same in a PyQGIS code (with the same input). This happens, for example, with the ...
• 123
2k views

### QGIS: Release file lock on file used in a processing algorithm at the end of script

I am using runalg (qgis:joinattributesbylocation) on two QgsVectorLayer objects. At the end of my script I'm trying to delete all the files created during the script. I can delete everything except ...
• 93
327 views

### Using memory layer as input with processing runalg in PyQGIS

My first processing runalg creates a memory layer as output. I need to use this layer as the input for the second runalg. #first processing.run("qgis:fieldcalculator", { 'INPUT': '...
• 691
462 views

### Create equidistant points along line network?

I am trying to create points at every X meters along a set of lines that represent a network. As suggested in QChainage doesn't place points evenly along dissolved lines I managed to this ...
• 51
50 views

### What is the name of the popular buffer algorithm?

There is a well-known algorithm that I believe is used for the "buffer" function in some GIS libraries and applications. I have a vivid memory of reading the paper that describes the algorithm and ...
41 views

### How does iterative clip decide its processing order?

I have a fishnet grid which I use to iteratively clip several large shapefiles. The output of the clipping tool results in the selected output filename plus an incrementing suffix (_0, _1, _2 ... _n). ...
• 455
259 views

### need Matching Algorithm which takes graph Topology into account

Problem: I have a problem (illustrated below) with matching two datasets. On the left I have a GIS containing drain network data (in blue), including diameter, length and topology information (from- ...
2k views

### Algorithm to simplify a Polygon/Series of Points to a given number of Points

I have a polygon (or let's call it just a series of points). I want to simplify it (reduce the amount of points) to a given number of points. Currently I use Douglas Peucker and try to guess the ...
• 218
185 views

### Optimum Path finding (for Cross Country Movement) using TIN

I am working on path finding algorithm (using A*) for cross country movement (not for road movement) on map using grid based approach. Algorithm supports path calculation considering slope of terrain. ...
308 views

### Is Hershbergers improved Ramer-Douglas-Peucker algorithim worth implementing?

Here is the article with code samples Other than the C code he wrote are their any implementations? Is it worth making a python or R module out of the C code? Are their known flaws to the algorithm? ...
81 views

### Clustering driven by an enum/list

Given a set of 2D points ( or vertices if you want ), the values stored for each point are: coordinate on x coordinate on y an enum or a value from a list in general for the sake of this example let'...
• 31
346 views

### Placement of a fixed-radius circle on a sphere to maximize point containment

There are many papers on the "Circle Placement Problem" in 2D Euclidean space, but I haven't been able to find any papers discussing this problem on the sphere. The problem is: given a set of points ...
• 131
66 views

### Existing Algorithms for label placement with callouts

I am thinking to answer the question here: Label placement with callouts in QGIS. I want to implement a kind of algorithm in python that will create 2 different columns [X and Y] that will be the ...
• 447
73 views

### Seeking algorithm for polygon straightening

I have a polygon that looks like this: I want to get a result that ideally looks like this: The best that I can come up with is a polygon simplification using shapely in Python: Which algorithm ...
35 views

### How to colorize hierarchically-ordered polygons?

I have to implement a solution for coloring a lot of polygons that are derived from a hierarchically-ordered dataset. The dataset can be compared to a family tree in terms of hierarchy. Most of the ...
• 129
45 views

### Output singlepart features by default for tools and algorithms in QGIS

In QGIS, many algorithms and tools return multipart geometries. For further processing, a conversion Multipart to singleparts is necessary. This is a bit cumbersome. To make just one example: when ...
• 70.6k
49 views

### Connecting points with Z values to lines where the Z values are retained in the nodes of the resulting line

I have interpreted seismic data as xyz-points (about 23 cm lateral resolution). They are not really ordered but rather a simple list of coordinates. One file contains multiple seismic "lines"...
43 views

### Are there any mass-preserving raster projection algorithms?

Raster maps (e.g. as a GeoTIFF) can be reprojected using tools like gdalwarp. While these tools do a decent job to project images, they are not truly mass-preserving, i.e. the total sum of the values (...
36 views

### Determine how regular a set of points is?

I'm trying to cluster some gps data to accurately determine stop points for vehicle movements on a testing grid. I know the points they stop at are regular/closely match points on some defined grid of ...
• 21
150 views

### Algorithm to find low/high atmospheric pressure systems in gridded raster data

What's the commonly used algorithm for finding center positions and values of low/high atmospheric pressure systems in gridded raster data (GRIB/NetCDF/GeoTIFF)? First I tried a naive approach to ...
• 204
864 views

### Doing TIN Interpolation in QGIS

I want to do TIN Interpolation on a layer but when I fill all the fields with the right data (vector layer, interpolation attribute, extent etc) the algorithm does not run and shows me this message: ...
70 views

### Efficient random access into rasters for hydrological analysis

I'd like to implement an algorithm to extract Strahler Streams as geometric lines from a predefined stream raster. I've done this using GDAL by walking across the rasters from the outlets or at the ...
• 1,569
74 views

### Multiple centroids of complex outline polygons by recursive buffering

How can I algorithmically determine multiple centroids for overlapping (dissolved), very irregular regions representing canopy outlines? This is effectively a forestry issue. The context is that I ...
112 views

### Calculate where a geodesic line crosses a meridian

Given a geodesic line between two points with known coordinates on a sphere, is there an easy way to calculate or approximate where this line crosses a specific meridian? I want to calculate where ...
• 391
78 views

### Splitting linestrings based on their curvature

I'm looking for a method to split linestrings based on their curvature, more precisely if part of them could be considered a street corner. For example in the screenshot below, I'd need to split the ...
• 331
79 views

### Getting minimum distance of points with scalable algorithm

I have a number of geographical coordinates with latitudes/longitudes: id | name | lat | lon 1 | New York | 40.730610 | 74.0060 2 | Philadelphia | 75.1652 | 39.9526 3 |...
• 129
196 views

### Simplifying Multiple neighbouring Polygons, removing gaps and overlaps

My main goal is to simplify multiple polygons, avoiding overlaps and gaps between them. My initial approach was: Find intersections for each polygon so that I end up with an array of polygons, each ...
• 21
46 views

### Seeking method for determining survey points?

I'm trying to write software to create a topographic map, my goal is to select several points of interest and create a minimal mapping that is inclusive of the points and interpolates the topography. ...
• 121
53 views

### Algorithm "qgis:difference" returns multiple heterogeneous outputs

I use the qgis:difference algorithm but it returns multi-type outputs. Sometimes it's a QgsVectorLayer but sometimes a str such as : output_.... My question is : when the algorithm returns an empty ...
• 1,263
92 views

### How can I share with other users a preconfigured algorithm?

I´m creating a process in QGIS, and I make it work automatic. But, I´ve used a preconfigured algorithm in order to avoid selecting shapes every time you use the process. So, is there any way I can ...
305 views

### GIS Clustering with drawing predefined square area around points as cluster boundaries

I have a layer of points and I would like to create clusters where a predefined square area of 5km by 5km is the boundary for the cluster. Is there a way to iteratively draw square polygons around ...
46 views

### How to take all active layers as input for an iterative algorithm?

I have a whole list of different layers I want to do a iterative clipping algorithm on. (Batch processing is not an option as the 'iterate' button is gone.) This is a follow up on my question here. ...
• 455
183 views

### Yen's or Eppstein for path with intermediate destinations which are dangling nodes

I'm trying to find a shortest path algorithm (which does not need to be optimal) for a path with intermediate destinations. Consider the following case: One wants to go from A to Z and in between ...
• 1,343
47 views

### How to Make automatic classes with algorithm in qgis modeler?

I have 1 column of numeric data in one attribute table of a layer made of points. I want to regroup this data in classes (style) with the Qgis modeler and each class must have a specific lenght that ...
203 views

### Seeking algorithm behind End Point Rate (EPR) to calculate movement of shoreline over period of years?

I am analyzing the shoreline change over a period of 20 years(1998-2018). I have following data: digitized shorelines of 1998, 2003,2008,2013 and 2018 one common baseline for all shorelines transect ...
• 105
176 views

### QGIS processing algortihm crashes in python console but works manualy

I am loading two layers from PostGIS database and I am trying to run 'qgis:intersection' algorithm with them. Execution of the algorithm through the python console initially works but crash after 2-3%....
• 21
141 views

### QGIS Projective Transformation Algorithm

I would need to know something more about the algorithm that Qgis (Georeferencer Plugin) uses to georeference with projective algorithm. I have tried to reproduce your results using other software ...
• 21
274 views

My requirement is that, say I'm given a MGRS grid (100mX100m), I now need the IDs of all the 8 MGRS grids around the one that was given. One way that is being suggested is as follows. Compute the ...
1k views

### Wrap the set of points to the minimum polygon

Given I have a set of points which represents the circles which are intersected. As result I'm trying to receive the boundary which represent the polygon which wraps all circles. Please take a look ...
913 views

### Is there an R package for finding the maximum-area rectangle in a non-convex polygon?

Does anyone know if there is an R package out there with an algorithm which finds the largest rectangle within non-convex polygons? I have Googled, searched the R Sig Geo archives, and looked here on ...
• 396
66 views

### Creating 30 areas with equal amount of road in irregular polygon using MapInfo?

The result should be something like this just more polygons. Does anyone know about a tool, which given a table, can create a number of polygons which will divide the tables object into, for ...
258 views

### Application of a Piecewise Logistic Function to Extract Seasonality Metrics

I am working with 16-day MODIS EVI (satellite) data and I want to fit a Piecewise Logistic Function through my 23 EVI data values. The following formula is for the Piecewise Logistic Function: y(t)= [...
• 155
911 views

### How to check if a polygon contains another polygon in OL3?

Is there any possibility to check if a polygon is contained in another polygon in OL3? I noticed there is a couple of methods in ol.extent e.g. ol.extent.containsExtent(extent1, extent2). But this ...
151 views

### Calculate distance in point collection algorithm

I've got collection of points which are sorted by x,y and distance between n and n+1 (array of objects [{x:0,y:0},{x:1,y:1}....] I would like to calculate distance between all points (point 1 distance ...
• 861
282 views

### Adding nodes into graph using QGIS?

I'm new to qgis and in here I want to find a path between two selected points on the map(Roads-vector layer). The points are selected by the user, using mouse clicks. So here I used the astar ...
• 145
118 views

### What graph traversal algorithm should I use?

I would like to write an algorithm which can traverse a graph and hopefully later I can implement it to use for an indoor navigation system. The graph would come from floor plans of a building and the ...
• 21