Skip to content

Instantly share code, notes, and snippets.

Hugo Mercier mhugo

Block or report user

Report or block mhugo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View test_qtcharts.py
from qgis.core import QgsVectorLayer, QgsFeatureRequest, QgsExpression
from PyQt5.QtCore import QPointF, QVariant, Qt
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QHBoxLayout, QPushButton
from PyQt5.QtChart import QLineSeries, QChart, QChartView, QDateTimeAxis, QValueAxis
import numpy as np
def series_to_polyline(xdata, ydata):
View test_geos_sfgal_limits.py
import struct
from fractions import Fraction
import psycopg2
def double_to_hex(f):
h = hex(struct.unpack('<Q', struct.pack('<d', f))[0])[2:]
# reverse each byte for endianness
return h[6:]+h[4:6]+h[2:4]+h[0:2]
def poly_wkb(x,y):
View keybase.md

Keybase proof

I hereby claim:

  • I am mhugo on github.
  • I am mhugo (https://keybase.io/mhugo) on keybase.
  • I have a public key ASAd4IAWv0qHrPFtkviC3nYwCb0YVIw_ml06fbAFIRzSQQo

To claim this, I am signing this object:

View deferred_qpicture.py
#!/usr/bin/env python
# This set of classes demonstrate how to implement a defered renderer with QT
#
# The idea is to be source compatible with existing QPainter operations (drawXXX, setBrush, etc.)
# and add extra commands that allow to "insert back" operations in the pipeline before they are actually rendered.
#
# This is a possible component for the "symbol clipping" feature of QGIS
#
# The rendering is split into "rendering layers" that correspond to "symbol layers" of QGIS.
View deferred_clipping.py
#!/usr/bin/env python
# This set of classes demonstrate how to implement a defered renderer with QT
#
# The idea is to be source compatible with existing QPainter operations (drawXXX, setBrush, etc.)
# and add extra commands that allow to "insert back" operations in the pipeline before they are actually rendered.
#
# This is a possible component for the "symbol clipping" feature of QGIS
#
# This prototype implements a custom QPaintDevice / QPaintEngine that will
You can’t perform that action at this time.