Skip to content

Instantly share code, notes, and snippets.

View gacarrillor's full-sized avatar

Germap gacarrillor

View GitHub Profile

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

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:

@gacarrillor
gacarrillor / run_tests.md
Last active March 12, 2024 16:41
Running QGIS Processing tests

Running processing (yamls based) tests

export LD_LIBRARY_PATH=/docs/dev/qgis/QGIS/build_duplicate_nodes/output/lib/
export PYTHONPATH=/docs/dev/qgis/QGIS/build_duplicate_nodes/output/python/:/docs/dev/qgis/QGIS/tests/src/python:/docs/dev/    qgis/QGIS/build_duplicate_nodes/output/python/plugins
export QGIS_PREFIX_PATH=/docs/dev/qgis/QGIS/build_duplicate_nodes/output

/docs/dev/qgis/QGIS/python/plugins/processing$ python3 tests/QgisAlgorithmsTest4.py

Run other Python tests

QGIS_PREFIX_PATH=output PYTHONPATH=output/python:$PYTHONPATH python3 /docs/dev/qgis/core/QGIS/tests/src/python/test_plugindependencies.py

@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. *
* *

As part of the application to the QGIS certification program, I'd like to show you my contributions to QGIS project.

Contributions to QGIS

(Version 2023.05.23)

  • 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)
#
# ***************************************************************************
# * *
@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).
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