Skip to content

Instantly share code, notes, and snippets.

View gacarrillor's full-sized avatar

Germap gacarrillor

View GitHub Profile

DXF Export enhancements

(Blog post draft)

At OPENGIS.CH, we've been working lately on improving the DXF Export QGIS functionality, and, in the meantime, we've also added nice UX enhancements for making it easier and much more powerful to use!

Let's see a short review:

DXF Export

  • Priority 1: Save/Load Settings

    • Preserve the latest DXF export settings within a project: at the moment, for example, the attributes with the dxf layer names have to be selected again for each layer each export
      • PRs #56121 (layer attribute selection) and #56017 (force 2D setting).
    • Ability to save and re-import from DXF export settings: → New PR #56982 🆕️
      • Transfer of settings in another project
  • Saving of different export settings per project

@gacarrillor
gacarrillor / buffer_on_selection.py
Last active July 17, 2023 13:56 — forked from ghtmtt/buffer_on_selection.py
buffer_on_selection
# -*- coding: utf-8 -*-
"""
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
  • RESET SOFT

    git reset --soft HEAD~1

  • REBASE

    git pull --rebase upstream master

    git push -f origin newfeature

@gacarrillor
gacarrillor / rename_shapes.py
Created November 1, 2021 00:43
Note this uses PyQt4. It was uploaded only for reference.
# -*- coding: utf-8 -*-
# ***************************************************************************
#
# Code borrowed from TableManager
#
# Copyright (C) 2008 Borys Jurgiel
# Adapted by Germán Carrillo to rename Shapefiles (2015)
#
# ***************************************************************************
# * *
import re
import xml.etree.cElementTree as et
def get_models_from_xtf(xtf_path):
"""
Get model names from an XTF file. Since XTF can be very large, we follow this strategy:
1. Parse line by line.
1.a. Compare parsed line with the regular expression to get the Header Section.
1.b. If found, stop parsing the XTF file and go to 2. If not found, append the new line to parsed lines and go
@gacarrillor
gacarrillor / gist:7ec1334136907dca982fc2747fff3e68
Created August 13, 2021 18:29
change_github_authentication_method.md
Issue
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
Solution
1. Generate a new token according to below link.
https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token
@gacarrillor
gacarrillor / gist:160720064e86edfa1032ea338d1f37cf
Last active October 1, 2021 20:19
Revisión Refactor Wizards (15.07.21)
  • Remover UIs (y clases) anteriores (ej. valuation) (dejar los de building_unitqualification_valuation.ui)
  • Reutilizar select_source.ui en wizard de puntos.
  • Mover wizard_constants.py a config/
  • Llevar EnumFeatureSelectionType a enums.py
  • Cambiar "Refactor" por "Refactor_fields".
  • Cambiar nombre EnumOptionType.
  • Heredar vistas? (o mejor no heredar, ej. ParcelView no está heredando de nada).
  • model->interfaces.py (YP no recuerda si se está usando, mirará si se puede quitar).
  • model->observer.py (YP dice que al pasar a señales, esta seguramente dejaría de tener sentido).
["PARAMETER"]
defaultGeometryTypeValidation="off"
Aql 8 98036 97649 97649 97278 97649 95501 95501 97804 99473 97804 95501 93747 93747 93244 95501 93805
And 5 677 3092 3092 5447 9640 5447 5447 4436 4436 3881
Scl 3 116231 4577 4577 115102 115102 116231
Ara 7 88714 85792 85792 83081 83081 82363 82363 85727 85727 85267 85267 85258 85258 88714
Lib 5 77853 76333 76333 74785 74785 72622 72622 73714 73714 76333
Cet 20 10324 11484 8102 3419 3419 1562 3419 5364 5364 6537 6537 8645 8645 11345 11345 12390 12390 12770 12770 11783 11783 8102 10826 12390 10826 12387 12387 12706 12706 14135 14135 13954 13954 12828 12828 11484 11484 12093 12093 12706
Ari 3 13209 9884 9884 8903 8903 8832
Sct 5 92175 92202 92202 92814 92814 90595 90595 91117 91117 92175
Pyx 2 42515 42828 42828 43409
Boo 9 71795 69673 69673 72105 72105 74666 74666 73555 73555 71075 71075 71053 71053 69673 69673 67927 67927 67459