10
votes
Accepted
Writing out PointM shapefiles from QGIS
You can use "Processing Toolbox > Vector Geometry > Drop M/Z Values" tool.
9
votes
Accepted
How to access shapefile m-values with pyqgis?
Assuming you have a QgsGeometry object (eg the geometry returned when calling QgsFeature.geometry()), you can access it's raw geometry info by calling QgsGeometry.geometry() in QGIS 2.x or QgsGeometry....
9
votes
Accepted
Randomly offset duplicate points along linestring X meters using PostGIS
Update duplicates with a randomly interpolated point on the nearest line, e.g.:
UPDATE
<points> AS pt
SET
geom = (
SELECT
ST_LineInterpolatePoint(
ln.geom,
-- ...
9
votes
Randomly offset duplicate points along linestring X meters using PostGIS
Group by geometry to find the duplicates, join the line to the points, interpolate the duplicates at a random distance along the line, union with the non duplicates:
--Find the duplicates by grouping ...
8
votes
Find order of points along polyline
If your route (polyline) layer's name is Route1 which has an id field (fid), and the point layer is Bears like below example.
Open the attribute table of the Bears (point) layer and start the Field ...
7
votes
Extracting nodes with M-values for Linear referencing in QGIS
With QGIS 3.0 or newer this task is trivial. In the "Processing Toolbox" (Open with ctrl+alt+t or Processing -> Toolbox) search for "Extract vertices" and run that algorithm.
...
7
votes
Accepted
Plotting points along line at specific distance value using PyQGIS
It's kind of easy to do with a Python script that you can run from the editor of the QGIS's Python Console.
First, you need to get your line layer and get the feature inside.
Then, you need to loop on ...
7
votes
Writing out PointM shapefiles from QGIS
As workaround, you could use a virtual layer, specifying a query similar to the following:
SELECT id, MakePointM(x, y, attribute) AS geometry FROM PointZM_layer;
And then export the virtual layer as ...
6
votes
Accepted
Extracting nodes with M-values for Linear referencing in QGIS
From what I can find there doesn't appear to be an existing solution for this exact situation, but I still wanted to be able to do this in QGIS, so I took the plunge into python scripting.
A guide ...
6
votes
Accepted
Are there any working examples of ogrlineref?
You can find sample data for ogrlineref at gdal test data: https://github.com/OSGeo/gdal/tree/master/autotest/utilities/data - path.shp and mstones.shp
An example of ogrlineref using is in test case: ...
5
votes
What is M-aware polyline in ArcGIS Desktop?
An m-aware polyline has the ability to store m-values (in addition to x and y values). M-values are 'measurement' values, for example the distance along a given line. They are often used in linear ...
5
votes
Accepted
PostGIS ST_LocateAlong returns incorrect interpolated Points
If you look at the WKT in a text editor, and you reformat it to have one vertex per line, it becomes pretty obvious where the interpolated values are calculated:
SELECT ST_AsText(ST_LocateAlong(
'...
4
votes
What is M-aware polyline in ArcGIS Desktop?
The M in M-aware stand for Measure and is another coordinate value like an X, Y or Z coordinate on each node. Measures are typically the relative linear distance of each vertex measured from the ...
4
votes
Linear referencing using QGIS only
This is Python solution for the QGIS Python console.
Just paste the code (after renaming "lines" to your line layer name) in the console.
It creates points every 100m along every single line feature ...
4
votes
Linear referencing to calculate maximum distance between points by group along line (river system) using ArcGIS Pro
LR will calculate distances along separate river segments. To apply it you need "long" rivers starting at multiple upstream points, ending at outlet(s). If you are capable of producing geometric ...
4
votes
Accepted
AttributeError: DescribeData: Method shapeType does not exist
You are almost there. As I mentioned in my comment, shapeType is a Describe property disclosed if the Describe.dataType is FeatureClass. Since you are working with a map and enumerating map layers, ...
4
votes
PostGIS ST_LocateAlong returns incorrect interpolated Points
Here's a simpler example of the behaviour:
SELECT ST_AsText(
ST_LocateAlong(
'MULTILINESTRINGM( ( 0 0 0, 2 2 2)
,(-1 0 -1, 1 0 1)
,( 8 8 8, 9 ...
3
votes
Find Point Along Line at Certain Distance
In QGIS 2.18 was introduced a new feature that does the job you seek.
The function is line_interpolate_point (geometry, distance), to be used in calcolatatore QGIS fields.
STEP 1: Create a new field '...
3
votes
Accepted
Working around MeasureOnLine function not being in ArcPy at earlier version?
I suspect that you are trying to use the MeasureOnLine function to perform some sort of linear referencing.
Without access to that function due to your version (ArcGIS 10.1) being earlier than its ...
3
votes
How to place labels at regular intervals orthogonally to a line feature?
I got something close using QGIS 2.16.
It needs some additional work / experimentation, but hopefully give you a starting point. I'm not sure how best to add an offset, but you might be able to hack ...
3
votes
Accepted
How to use the linear referencing plugin from QGIS with postGIS data?
TESTED USING THE LRS PLUGIN VER 0.3.6
Your problem may be that you need to update your plugin/QGIS version
This is from the changelog of the LRS plugin:
changelog:
0.3.6
- Fixed issue #6 (PostGIS ...
3
votes
Accepted
Splitting line into segments of different length with ArcGIS Desktop?
I would say you are almost there with one difference. Don't think of them as cut points think of them as reaches. So add a FROM and TO distance field to your dBase table so it contains data as below:
...
3
votes
Trying to understand QGIS LRS plugin - How to implement?
The first question you have to ask yourself is
"Is linear referencing the solution I need to solve my downstream problems?"
Road networks are notorious for being difficult linear networks to ...
3
votes
How to create a line feature which contains the overlying polygon attributes?
Assuming you have a proper line network dataset, particularly direction of traverse is correct:
Copy your lines as M values are enabled (if the SHAPE is not Polyline M, see https://desktop.arcgis....
3
votes
ST_3DIntersection with LINESTRING M and POLYGON M
PostGIS has a small but powerful set of Linear Referencing functions to work with trajectories, utilizing the full potential of M values:
interpolating an isolated event (a MULTIPOINT M, or ...
3
votes
Ordering points along polyline using line_locate_point function in QGIS
You may try using the "Add autoincremental field" geoalgorithm.
Let's assume there are two layers: a point 'points' and a polyline 'poly_test' respectively, see image below.
Open the "...
3
votes
Accepted
How to request GeoJSON standard be enhanced to support M-values
Enhancements to geospatial JSON format will likely happen through the "OGC Features and Geometries JSON" https://github.com/opengeospatial/ogc-feat-geo-json. The new standard is in a draft ...
3
votes
Accepted
QGIS - Find point position on line (lengthwise)
You can use the field calculator on the POINT_Layer. I don't think there is a one-click tool.
line_locate_point(aggregate('YOUR_LINE_LAYER_NAME','collect',$geometry),$geometry)
EDIT - Based on ...
2
votes
Accepted
Counting points (accidents) per segment of roads layer?
Since your accidents are snapped to your lines, if your lines are already segmented the way you want and you don't mind the accidents being counted on two or more segments when they fall exactly on an ...
2
votes
Accepted
ST_LocateAlong interpolation: difference between PostGIS and Spatialite
Ran across the same issue and was delighted to find spatialite has bridged this gap with ST_TrajectoryInterpolatePoint (currently misspelled as ST_TrajectoryInterpolarePoint in the doc at gaia).
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
linear-referencing × 287arcgis-desktop × 110
qgis × 52
arcpy × 35
arcmap × 30
postgis × 26
arcgis-10.1 × 25
distance × 23
arcgis-pro × 19
point × 19
line × 19
route × 17
geoprocessing × 11
arcgis-10.2 × 10
arcgis-10.3 × 10
arcgis-10.0 × 9
qgis-plugins × 9
dynamic-segmentation × 9
linestring × 8
m-values × 8
coordinate-system × 6
intersection × 6
routing × 6
python-script-tool × 6
arcgis-roads-highways × 6