GithubHelp home page GithubHelp logo

qchainage's Introduction

qchainage

Chainage Plugin for QGIS QChainage is a tool to do linear referencing on lines and polylines.

QChainage can:

  • chainage only selected features or all features
  • chainage from start to endpoint or the whole feature (or any other combinations)
  • define offset and interval parameters
  • define a number of parts in which the line should be separated
  • force adding an endpoint to the line

Resulting layer is currently a "memory layer" which can be exported by the "save as" function to any vector format.

qchainage's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

qchainage's Issues

New Feature Request : Support for saving to shapefile

Hi,

This plugin is really great when working with small files but easily runs out of memory, I think this is because it is storing the point data in memory.

Will it be possible to select an on disk shapefile that will store the points so that main memory consumption is limited.

the plugin crashed in QGis 2.14.2 Essen

unfortunately, when i select my line and use the plugin QGis crashes.
so maybe you know how it comes, but how can i read the dump file?

i will fork the code and maybe I can debug the plugin

Qchainage not starting at the end of poly line

I'm trying to calculate a 10m chainage on a layer single part polylines I have in QGIS but when I use the plugin the chainage starts at mid point on the lines. It appears as if it's selecting random vertices to start and begin the chainage
qchain

Qchainage Field Type Int

The distance is beeing stored in a Integer field, so When I save it to a shapefile, I got truncated numbers.

Solution:
Replace the line 156 of chainagetool.py below:
QgsField("cng_("+unit+")", QVariant.Int)])
by
QgsField("cng_("+unit+")", QVariant.Double)])

New Feature: show as an algorithm

Does exactly what I want it to do by segmenting a selected line by the percentage of the total length (advanced: divide feature into ? part). Just wish I could use it as model output:-(

working with GPX files

Hi

Using Qchainage in Qgis 1.9.0Master chainage generation works fine on drawn shape in Qgis in project layer WGS 84 / UTM zone 56s.

But with QGIS setup with Measure tool set to WGS 84 and canvas and layer units set to metres. Imported GPX tracks in WGS 84 / qchainage returns degree not the metric measurement?

Screen measurments and the scale bar are correct on data shown.

Any help would be appricated!

D

qChainage crashes QGIS 2.18.12 on Linux Mint 18.2 / Ubuntu Xenial x64

I'm running the latest QGIS 2.18.12 from the nightly repositories on x64 Linux Mint 18.2 with version 2.0.0 of the plugin.

QGIS works perfectly but crashes instantly when pressing the qChainage button. It can be a blank project with no layers added or a project with one linestring shapefile or a project with multiple layers.

If you can point me to where QGIS might log any errors I'll add them to this issue.

Add ID to output

Currently the output is only one column (distance from start). Id would be useful, probably trivial to add.

Reverse chainage option greyed out

qchainage reverse chainage and selected feature only is greyed out, although option is very important step when calculating the chainage .kindly advise .

Geodetic Calculation

Is it possible to add a way to calculate in geodetic instead of projected?
Thank's

Duplicated feature id

QGIS version 3.10.4-A Coruña
Qchainage version 3.0.1

When I run qchainage it output a layer where each feature has the same fid: 1.

The main issue is, when attempt to make the layer permanent, for example saving it as a gpkg the following error happens :

Could not make temporary scratch layer permanent.
Error: Feature write errors:
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: xxx.fid)

Each feature should be given a unique fid.
The fid could be, for example, the feature index.

Problem with lines shorter than start point

On select geometry line of 300 meters and chainage start from 500 meters, show error null geometry.

Problem is you have 1000 features in layer. I have to manualy remove from selection lines shorter than 500 meters.

Certainly, plugin is super.

Edit:
chainagetool.py
line 165
if geom.length() < startpoint: continue

Only one point is visible

I am trying to use QChainage on the file below. I leave all settings at default except Advanced->Divide Feature into x parts, which I set to 25.
When I run this, the result is a single visible point. When I check the attribute table, there are 25 points, All have FID 0, and only one point (point 4 as it happens) has geometry. The rest have no geometry, as witnessed by selecting right-click->zoom to on the feature.
QGIS 3.4.2 on Windows 7 Pro 64 bit.

ContDiv.zip

determine drawing direction

how does qchainage decide where to start?

i have one feature and want to put the milestones from west to east but QChainage place them from east to west

Pleae add a description

It is currently very difficult to find this very useful plugin. Please consider renaming it and/or adding a more extensive description.

Put the real ID of the chained line

Hi, I found very interesting your plugin.
I have a question: what is referring to the "fid" field? I'm asking because seems there is no connection with the chained layers. It would be wonderful to have the possibility to choose a custom field in order to have the relationship to the chained node.
Regards
Roberto

python error at start up plugin QGIS 3.0.3

the plugin is installed without problems, but pyton error appears at startup

image

error:
2018-06-19T22:18:53 WARNING Traceback (most recent call last):
File "C:/Users/Salvatore/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qchainage\qchainagedialog.py", line 95, in on_selectLayerComboBox_currentIndexChanged
self.da.setSourceCrs(layer.crs())
TypeError: QgsDistanceArea.setSourceCrs(): not enough arguments

win 10 64 bit
OSGeo4w QGIS 3.0.3

8a899c8758

THANK YOU

QChainage - is possible to exceed the limit of the 99 parts ?

I would want to know if it is possible to exceed the limit of the 99
parts of equal length in which it is possible to divide in equal parts
a polilinea.
In the Decimal Metric System them it is important to catch up the value
of 100, 1000 or 10000 equal parts.
For a line of street distance a subdivision in equal parts would be had
(every 10 meters or 5 meters) along a section of 1 km or multiples of
km.
I must necessarily divide a street distance between two marks them of
progressive kilometric es. between km 710 and km 711, or between km
710 and km 720
thanks

Unable to change distance unit in QGIS 3.30

I upgraded to the new QGIS 3.30. When I try to change "meters" to "feet" on the QChainage options screen, it presents this error:

An error has occurred while executing Python code:

TypeError: QgsDistanceArea.convertLengthMeasurement(): argument 2 has unexpected type 'int'
Traceback (most recent call last):
File "/Users/[username]/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/qchainage/qchainagedialog.py", line 119, in on_UnitsComboBox_currentIndexChanged
calc = self.da.convertLengthMeasurement(1.0, self.currentUnits)
TypeError: QgsDistanceArea.convertLengthMeasurement(): argument 2 has unexpected type 'int'

Python version: 3.9.5 (default, Sep 10 2021, 16:18:19) [Clang 12.0.5 (clang-1205.0.22.11)]
QGIS version: 3.30.0-'s-Hertogenbosch 's-Hertogenbosch, f186b8efe0

--

If I proceed, it displays the same message a few more times. The results are incorrect since it seems to use the default meters unit even though feet is selected.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.