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

Some processing features + fixes #3346

Merged
merged 9 commits into from Aug 2, 2016
Merged

Conversation

nyalldawson
Copy link
Collaborator

Main thing this PR does is implement a new algorithm for merging connected linestrings. I haven't found a good way to do this using the existing providers + algorithms, so always have to resort to PostGIS' st_linemerge function. This new algorithm makes it possible to do this in processing.

I've also fixed a bug in multipart to singlepart, and added some tests.

@nyalldawson
Copy link
Collaborator Author

Just added another feature - this lets you select multiple fields when using the dissolve algorithm. It's another thing which is almost impossible to do reliably using the existing provider algorithms.

@m-kuhn any idea on why the test is failing with a crs comparison? I can't see what I've done differently and it works locally

processing team: is there any way to disable parameters based on another parameter? I find it confusing that the dissolve field choice is enabled when "dissolve all" is selected. I often run a dissolve after picking a field, only to have forgotten this checkbox and need to repeat the operation...

@alexbruy
Copy link
Contributor

alexbruy commented Aug 1, 2016

@nyalldawson Processing does not allow to change (enable/diable) algorithm parameters on the fly. Currently the only possible solution is to split algorithm into two with different set of parameters.

@nyalldawson
Copy link
Collaborator Author

@alexbruy ok thanks- it'd be a nice ui enhancement to add at some stage :)

@m-kuhn gentle ping... Any idea on the crs issues?

@m-kuhn
Copy link
Member

m-kuhn commented Aug 1, 2016

I remember I had some strange issues with CRS as well. I think it was related to some files (.xsd?) being checked in but that does not seem to be the case here...

@m-kuhn
Copy link
Member

m-kuhn commented Aug 1, 2016

hold on... there are xsd files. Can you try to remove them?

This algorithm joins all connected parts of MultiLineString
geometries into single LineString geometries.

If any parts of the input MultiLineString geometries are not
connected, the resultant geometry will be a MultiLineString
containing any lines which could be merged and any non-connected
line parts.
This allows you to dissolve based on more than one field value
@nyalldawson
Copy link
Collaborator Author

@m-kuhn So, turns out the xsd files are required. But in the end what worked was rewriting the gml using ogr2ogr. Not sure why, but it's fixed the test here.

@nyalldawson nyalldawson merged commit f9fabb8 into qgis:master Aug 2, 2016
@nyalldawson nyalldawson deleted the processing branch August 2, 2016 04:45
@m-kuhn
Copy link
Member

m-kuhn commented Aug 2, 2016

So the main thing ogr2ogr did was adding even more xsd files?

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

Successfully merging this pull request may close these issues.

None yet

3 participants