Loading
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
#!/usr/bin/env python3 | |
# 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 | |
# copies of the Software, and to permit persons to whom the Software is |
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
Examples for some pyqgis common functions. | |
Some may be outdated as things can be done easier in qgis3 now but they should just be an example | |
for some functions that were use to make life easier during the development of QGIS plugins: | |
examples from https://github.com/boundlessgeo/lib-qgis-commons/blob/master/qgiscommons2/layers.py | |
def load_layer(filename, name = None): | |
''' | |
Tries to load a layer from the given file | |
:param filename: the path to the file to load. |
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
ExifToolVersion = 10.10 | |
FileName = 2019_02_steffen_MOV_0124.MP4 | |
Directory = . | |
FileSize = 2518372718 | |
FileModifyDate = 1551173630 | |
FileAccessDate = 1551197571 | |
FileInodeChangeDate = 1551337413 | |
FilePermissions = 33261 | |
FileType = MP4 | |
FileTypeExtension = MP4 |
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
- - - - - - - - - - - - - - - - - - - - - - - - - | |
HelloWorld| repository: http://www.itopen.it/changedrepo | error: 404 | |
HelloWorld| tracker: http://bugs.itopen.it/changed | error: 404 | |
- - - - - - - - - - - - - - - - - - - - | |
Html Image Map Plugin| tracker: http://hub.qgis.org/projects/imagemapplugin/issues | error: 403 | |
- - - - - - - - - - - - - - - - - - - - | |
SimpleSvg| tracker: http://hub.qgis.org/projects/simplesvg/issues | error: 403 | |
- - - - - - - - - - - - - - - - - - - - | |
OGR2Layers| tracker: http://hub.qgis.org/projects/ogr2layers | error: 403 | |
- - - - - - - - - - - - - - - - - - - - |
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
# encoding: utf-8 | |
from __future__ import unicode_literals | |
#----------------------------------------------------------- | |
# Copyright (C) 2019 Thomas Baumann | |
#----------------------------------------------------------- | |
# Licensed under the terms of GNU GPL 2 | |
# | |
# 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 |
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 |
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
__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 | |
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 |
OlderNewer