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

Feature #8725R: support for maximum scale at which the layer should be simplified #1094

Merged
merged 2 commits into from
Jan 22, 2014

Conversation

ahuarte47
Copy link
Contributor

This patch adds a new setting for the simplification of vector layers:

The simplification uses a maximum scale at which generalisation should be carried out to the layer rendering options.

So e.g. if I choose 1:50000, no simplification should be carried out in scales [1:1, 1:50000].

@ahuarte47
Copy link
Contributor Author

Hi @timlinux, this capabilty was suggested by you
Best Regards

@timlinux
Copy link
Member

Hi

Awesome thanks! Just one note on coding practice - it is nice if you can annotate your docstrings for new methods and classes etc. with

@added in 2.2

So someone browsing the API can understand what versions their code will be supported in.

@ahuarte47
Copy link
Contributor Author

Ok, from now on I will do it, or do you want that I write it in current code ?

@timlinux
Copy link
Member

Hi

If you are able to do both that will be great! By the way I get may log messages like this:

selection_001

When using the generalisation. The debug messages themselves make QGIS crawl to a snailspace. It would be good if you could trap for and either silently ignore or log an aggregated message.

@nyalldawson
Copy link
Collaborator

@timlinux that looks like http://hub.qgis.org/issues/9375

@ahuarte47
Copy link
Contributor Author

Hi @timlinux, I am conversing with @jef-n, the commit (3305a6c) has the ogr simplification broken. I am waiting that pull #1087 to be merged (I think that it fixes these errors).

@ahuarte47
Copy link
Contributor Author

You were faster than me :-), thanks @nyalldawson

@timlinux
Copy link
Member

Hi

Ah ok thanks. I will merge this PR in the mean time. In the bug fix period it would be nice if you can annotate any new api additions and provide a new PR.

Thanks!

Tim

timlinux added a commit that referenced this pull request Jan 22, 2014
Feature #8725R: support for maximum scale at which the layer should be simplified
@timlinux timlinux merged commit f2d0100 into qgis:master Jan 22, 2014
@ahuarte47 ahuarte47 deleted the Issue_8725R-maxscale branch January 22, 2014 11:41
@ahuarte47
Copy link
Contributor Author

Thanks @timlinux, the pull #1087 was merged, can you test your issue please ?

@timlinux
Copy link
Member

Hi

I still get these errors using QGIS built against 5d02020

Regards

Tim

@ahuarte47
Copy link
Contributor Author

Hi @timlinux, can I test your layer ?

@ahuarte47
Copy link
Contributor Author

Hi @timlinux, If you are testing a postgis layer, then these error comes from a bug in ST_Simplify function of postgis ( http://trac.osgeo.org/postgis/ticket/1698 ). This bug collapses the geometries when the tolerance is too much big.

If you are using postgis, this patch fixes it:
#1099

@timlinux
Copy link
Member

@ahuarte47 Yes I am using PostGIS and I can confirm that with 1099 applied the problem is resolved (and the UI is much faster to update now).

Thanks

Tim

@ahuarte47
Copy link
Contributor Author

Thanks @timlinux, but I have one error, can you merge this pull ?
#1102

It avoids check topology state for point lasyers
Thanks!

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.

3 participants