Skip to content

Instantly share code, notes, and snippets.

View t-book's full-sized avatar
💭
reading

Toni t-book

💭
reading
View GitHub Profile
/*
================================================================================
MATERIALISIERTE VIEW: Grabstellen mit intelligenter Punktplatzierung
================================================================================
ZWECK:
Diese materialisierte View erstellt für jede Grabstelle (Polygon) einen
optimalen Textplatzierungspunkt samt Rotation für die Kartendarstellung.
HAUPTPROBLEM:
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import org.qfield
import org.qgis
import Theme
Item {
id: plugin
SECTION("ReadFileContent")
{
// Create a temporary file with known content
QTemporaryFile tempFile;
REQUIRE(tempFile.open());
const QString testContent = "This is test content for file reading";
tempFile.write(testContent.toUtf8());
tempFile.flush();
// ===> In fileutils.h
/**
* Reads the entire content of a file and returns it as a byte array.
* @param filePath The path to the file to be read
* @return The file content as a QByteArray
*/
Q_INVOKABLE static QByteArray readFileContent(const QString &filePath);
/**
* Writes content to a file.
@t-book
t-book / Link
Created December 14, 2024 15:10
  1. Quellverzeichnis und Zielverzeichnis auswählen

    • Vor Beginn der Verarbeitung prüfen, ob Quelldaten vorhanden sind. Falls der in-Ordner leer ist, wird das Programm gestoppt und eine Fehlermeldung ausgegeben.
  2. Messdateien von Quellverzeichnis kombinieren

    • Mehrere Messdateien in einer Datei zusammenführen => out.dat
  3. out.dat Bereinigung

    3a. `Geotags standardisieren

Übersicht Blackbox bei der Verarbeitung von Messdateien

  1. Arbeitsordner erstellen (Zeile 44)

  2. Originaldaten.txt anlegen
    Datei mit dem Namen der Messdatei erstellen, um festzuhalten, welche Datei prozessiert wurde. (Zeile 53)

  3. Daten verarbeiten (Zeile 55)

    • Kombinieren, Normalisieren, Standardisieren der Geotags, Neu-Nummerieren der Zeilen und Ausrichten der Datei(en).