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

Get rid of unlabeled areas at the edges of metatiles #20

Merged
merged 1 commit into from
Jun 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions tiles_xyz/tiles_xyz_algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,17 +260,6 @@ def generate(self, writer, parameters, context, feedback):
settings.setExtent(wgs_to_dest.transformBoundingBox(extent))
settings.setOutputSize(size)

if hasattr(settings, 'setLabelBoundaryGeometry'):
label_area = QgsRectangle(settings.extent())
lab_buffer = label_area.width() * (lab_buffer_px / size.width())
label_area.set(
label_area.xMinimum() + lab_buffer,
label_area.yMinimum() + lab_buffer,
label_area.xMaximum() - lab_buffer,
label_area.yMaximum() - lab_buffer
)
settings.setLabelBoundaryGeometry(QgsGeometry.fromRect(label_area))

image = QImage(size, QImage.Format_ARGB32_Premultiplied)
image.fill(Qt.transparent)
dpm = settings.outputDpi() / 25.4 * 1000
Expand Down