Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect prof_id assignment if generating over a threshold number of profiles from polyline shapefile? #10

Closed
wobrotson opened this issue Jul 26, 2018 · 14 comments

Comments

@wobrotson
Copy link

wobrotson commented Jul 26, 2018

Hello, I have been trying to process a poly-line shapefile in QGIS using your plugin. The first time I ran the plugin, the profile had 106 lines. I specified the line order field as 'id', an integer feature class running from 1 - 106, and processing worked as expected, with each profile (when plotted in matlab from an exported csv file) corresponding to that drawn using the 'Profile' plugin in QGIS. I then performed the same analysis on other polyline shapefiles with 38 and 76 features respectively, again with success.

Later, I came to add further features to the initial polyline shapefile so that rather than having 106 it now had 301 features. I extracted the profiles again using qProf plugin, and the feature incorrectly assigned the id of the features, so that in the csv file the profiles generated no longer matched those specified in the 'id' feature class of the initial polyline shapefile. I plotted a shapefile of the same data generated by qprof and there seemed to be no pattern to the assignment of id to the lines. I tried splitting the shapefile into 3 smaller shapefiles each with 100 features (ids of 1-100, 101-200, 201-301 respectively). The same result occurred, with the incorrect assignment of the prof_id in the csv file generated. The incorrect result for the first smaller shapefile (first 100 features) was the same as the incorrect result as when I tried on the shapefile with all 301 features present.

If you can identify a reason and possible fix for this I would be very grateful. I can supply the relevant files if needed.

@wobrotson wobrotson changed the title problems if generating over a threshold number of profiles from polyline shapefile? incorrect prof_id assignment if generating over a threshold number of profiles from polyline shapefile? Jul 26, 2018
@mauroalberti
Copy link
Owner

mauroalberti commented Jul 27, 2018 via email

@wobrotson
Copy link
Author

wobrotson commented Jul 27, 2018

Hi Mauro,
I have sent you an email with a link to the files in a compressed zip folder.

cheers, Rob

@mauroalberti
Copy link
Owner

mauroalberti commented Jul 27, 2018 via email

@wobrotson
Copy link
Author

I just tried to process the same data in the latest release for QGIS 3, the same result occurred.

@mauroalberti
Copy link
Owner

mauroalberti commented Jul 30, 2018 via email

@wobrotson
Copy link
Author

wobrotson commented Jul 30, 2018

I checked 'layer has multiple profiles', and also set the line order id to be my 'id' attribute in the shapefile, and the order is still incorrect. I have tried only checking the box 'layer has multiple profiles', and it still performs it incorrectly.

Are you saying that I should not check the 'layer has multiple profiles' box and only set the line order id?

@mauroalberti
Copy link
Owner

I am saying that what you are looking for is still to be implemented.
The results that you are obtaining by setting the "multiple profile" option are (very probably) correct under the current implementation: multiple profiles with their id given by the order of the feature in the attribute table, not by the line order field that has another, completely different purpose.
If you set "multiple profiles" the "line order field" is currently ignored, since it refers only to the merging of different lines into a single profile, not regulating the plot order of multiple profiles.
I would implement this new feature but probably not before next week end.

@wobrotson
Copy link
Author

Ah I see, sorry for the confusion. that's great, thanks very much for your help.

@mauroalberti
Copy link
Owner

mauroalberti commented Jul 31, 2018 via email

@wobrotson
Copy link
Author

wobrotson commented Aug 1, 2018

I have downloaded and extracted the code to the usual folder:

C:\Users\MyUsername\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\qProf-0.4.1RC1

after uninstalling the old release for QGIS3, release 0.4.0.

however, on trying to install the plugin from plugin manager I get the following error message:

Couldn't load plugin 'qProf-0.4.1RC1'

ModuleNotFoundError: No module named 'qProf-0'
Traceback (most recent call last):
File "C:/PROGRA1/QGIS31.0/apps/qgis/./python\qgis\utils.py", line 311, in loadPlugin
import(packageName)
File "C:/PROGRA1/QGIS31.0/apps/qgis/./python\qgis\utils.py", line 664, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'qProf-0'

Python version: 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)]
QGIS version: 3.0.3-Girona Girona, 8a899c8758

@mauroalberti
Copy link
Owner

mauroalberti commented Aug 1, 2018 via email

@wobrotson
Copy link
Author

It seems to have worked! Thats great, I am very grateful.

@mauroalberti
Copy link
Owner

mauroalberti commented Aug 1, 2018 via email

@mauroalberti
Copy link
Owner

Released improved version as 0.4.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants