This file contains hidden or 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
<h3>coalesce() function</h3> | |
Returns the first non-NULL value from the expression list. | |
<br> | |
This function can take any number of arguments. | |
<h4>Syntax</h4> | |
<code>coalesce(expression1, expression2 ...)</code><br> | |
<h4>Arguments</h4> | |
<code>expression</code> - any valid expression or value, irregardless of type. | |
<br> |
This file contains hidden or 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
import os, arcpy | |
#create blank text file | |
with open("C:\\Temp\\GISlayers.txt", "w") as txt: | |
for root, dirs, files in os.walk("C:\\Temp\\temp"): | |
for f in files: | |
#look for shapefiles | |
if f.endswith('.shp') or f.endswith('.lyr') or | |
f.endswith('.img'): | |
desc = arcpy.Describe(root + "\\" + f) |
This file contains hidden or 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
# Get the latest changes | |
git fetch upstream | |
# While on master | |
# Bring my master up to line with latest stuff | |
git rebase upstream/master | |
# Checkout the branch for working | |
git checkout -b working |
This file contains hidden or 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
--- | |
layout: post | |
title: "My QGIS git workflow" | |
description: "" | |
category: git | |
tags: [git qgis] | |
--- | |
{% include JB/setup %} | |
{% excerpt %} |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>My QGIS git workflow</title> | |
<meta name="description" content=""> | |
<meta name="author" content="Nathan Woodrow"> |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>My QGIS git workflow</title> | |
<meta name="description" content=""> | |
<meta name="author" content="Nathan Woodrow"> |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>My QGIS git workflow</title> | |
<meta name="description" content=""> | |
<meta name="author" content="Nathan Woodrow"> |
This file contains hidden or 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
class qchainageDialog(Ui_Dialog): | |
def __init__(self): | |
Ui_Dialog.__init__(self) | |
# Set up the user interface from Designer. | |
# self.iface = parent | |
self.setupUi(self) | |
self.distanceSpinBox.setValue(1) | |
self.qgisSettings = QSettings() |
This file contains hidden or 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
mylayer = qgis.utils.iface.activeLayer() | |
mylayer.select() | |
for feature in mylayer: | |
geom = feature.geometry() | |
attrs = feature.attributeMap() |
This file contains hidden or 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
/** | |
* This class caches features of a given QgsVectorLayer. | |
* The features are automatically updated and/or invalidated, whenever a change happens to the feature. | |
* | |
* It is the callers responsibility to make sure, that he specifies all required fields in every select operation. | |
* There is no guarantee, that a cached feature will contain a field not specified in a previous select operation. | |
* | |
* Performance: | |
* Depending on the usage scenario, it can be a good idea to prepopulate the cache by calling select, nextFeature and | |
* and removeCachedFeature. This is especially interesting, whenever requesting a single feature from the dataProvider |