Creating Geometries

Simple Geometries:

StSpatialCommand(functionToApply, layer, outputLayername)
Parameters:
  • functionsToApply (type) – Choose between Kernel, BBox, Centroid, Convex Hull
  • layer (QgsVectorLayer) – input layer
  • outputLayername (string) – output layer name
  • The Kernel is the sub-area within which all other points in a geometry are visible
  • Centroid is the center-most point of a geometry
  • The Bounding Box is the smallest square within which the originial geometry can fit
  • The Convex Hull is the smallest convex geometry that encompasses the entire original geometry

Complex Geometries :

STConnectedSpacesAndPatios(inputLayer, buffDist).execute()
Parameters:
  • inputLayer (qgsVectorLayer) – A vector layer of polygons
  • buffDist (float) – The distance of the buffer
Returns:

connectedSpaces: a Convex Hull of the input Layer minus the built exterior ring

Returns:

builtExtRing: A vector layer containing the negative buffer of the unions of the positive buffers of the input layer

Returns:

patios: a vector layer containing the open space left over from the built exterior ring which is not contained in the connected spaces.

http://mau.hypotheses.org/files/2017/12/base_map.png

Original buildings layer.

http://mau.hypotheses.org/files/2017/12/patios_extRing_conSpaces.png

The Convex Hull (grey), the exterior buildings rings (black), and the patios (white).

STSkeletonizeTheVoid(buildingsLayer, samplingDist).execute()
Parameters:
  • buildingsLayer (qgsVectorLayer) – The input layer containing polygonal geometries
  • samplingDist (float) – The distance between samping points for the Voronoi polygons
Returns:

The skeleton

Returns:

The layer of nodes used for the calibration of the Voronoï process

Returns:

A Voronoï polygons layer

Tip

Use the built exterior ring returned by STConnectedSpacesAndPatios() as input layer to remove empty spaces between buildings and create a single uninterupted graph.

http://mau.hypotheses.org/files/2017/12/skel_buildings.png

The skeletonization will occure at every open space, including areas surrounded by buildings are therefore not pertaining to any mobility graph.

http://mau.hypotheses.org/files/2017/12/skel_extRing.png

Using the exterior ring of buildings creates a interconnected web.

Zooming into an interection, we can notice the effect of the sampling distance :

http://mau.hypotheses.org/files/2017/12/skel_voro_extRing_zoom_ugly.png

samplingDist == 10.0

Buildings in black, voronoi polygons in purple, nodes in green

http://mau.hypotheses.org/files/2017/12/skel_voro_extRing_zoom_nice.png

samplingDist == 1.0

Buildings in black, voronoi polygons in purple, nodes in red