This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from qgis.core import * | |
from qgis.gui import * | |
import os.path | |
@qgsfunction(args='auto', group='Custom',usesgeometry=False) | |
def layername_aus_pfad(current_path, feature, parent): | |
""" | |
Layername aus dem Pfad ermitteln | |
current_path: an die Funktion uebergebener pfad, wie z.B. layer_by_path('D:\loeschen\gemarkungen.shp') | |
""" | |
path=os.path.normpath(current_path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from qgis.core import * | |
from qgis.gui import * | |
@qgsfunction(args='auto', group='Custom') | |
def eindeutige_legende1( layername, feature, parent,context): | |
try: | |
project = QgsProject.instance() | |
ausgabe=None | |
legendenlayer = QgsExpressionContextUtils.projectScope(project).variable('eindeutig') |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
layer = QgsProject.instance().mapLayer('[% @layer_id %]') | |
from qgis.core import Qgis, QgsVectorFileWriter | |
exportpath="D:/loeschen/test.gpx" | |
error, error_string = QgsVectorFileWriter.writeAsVectorFormat( layer, | |
exportpath, | |
"UTF-8", | |
layer.crs(), | |
"GPX", | |
onlySelected=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# vim: ft=python ts=4 sw=4 expandtab | |
# | |
# Copyright (c) 2013 Reed Kraft-Murphy <reed@reedmurphy.net> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
settings=QSettings() | |
test=settings.allKeys() | |
errorcounter=0 | |
for i in test: | |
if(u'Projections/EPSG:25832/EPSG:31467_coordinateOp' in i): | |
if settings.value(i)!=u'+proj=pipeline +step +inv +proj=utm +zone=32 +ellps=GRS80 +step +inv +proj=hgridshift +grids=BWTA2017.gsb +step +proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel': | |
errorcounter+=1 | |
else: | |
settings.setValue('Projections/EPSG:25832/EPSG:31467_coordinateOp',u'+proj=pipeline +step +inv +proj=utm +zone=32 +ellps=GRS80 +step +inv +proj=hgridshift +grids=BWTA2017.gsb +step +proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
call "%~dp0\o4w_env.bat" | |
call qt5_env.bat | |
call py3_env.bat | |
@echo off | |
path %OSGEO4W_ROOT%\apps\qgis\bin;%PATH% | |
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/qgis | |
set GDAL_FILENAME_IS_UTF8=YES | |
rem Set VSI cache to be used as buffer, see #6448 | |
set VSI_CACHE=TRUE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'kersten.clauss' | |
"""Benchmark different GeoTiff compression algorithms. | |
Usage: GTiff_compression_benchmark.py some_geo.tif | |
Requires the GDAL tools to be present and executable from the command line of your system. | |
This script will take a GeoTiff as input and create copies with different compression algorithms from it. | |
It measures the filesize, compression and decompression times and returns them as a table. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set OSGEO4W_ROOT=C:\OSGeo4W64 | |
set basis_url="https://www.geodatenportal.sachsen-anhalt.de/gfds/ws/wfs/942f5d74-6c2b-263a/GDI-LSA_Schutzgebiete/ows.wfs?REQUEST=GetCapabilities&SERVICE=WFS" | |
set layer="sg:lau_br_lsa" | |
call "%OSGEO4W_ROOT%\bin\o4w_env.bat" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ---------------------------------------------------------------------------------------------------------------------- | |
# Name: CompareCompression.py | |
# Py-Version: 3.x.x | |
# Purpose: Takes a sample GeoTIFF and writes a table to the command line describing the | |
# file size, read speed, and write speed of each GDAL compression. You can use this | |
# tool to decide how to best compress a single image, or a collection of images. | |
# | |
# Notes: The Python interpreter and GDAL must be accessible by cmd. The easiest way to do | |
# this by using the python installation included with ArcGIS Pro 2.3.x and later. | |
# This installation has the GDAL site package and binaries already configured. Add |