GSTPy.GeometryBuilder¶
-
class
GSTPy.GeometryBuilder¶ Bases:
GSTPy.StreamableGeometryAllows to create a geometry for upload/update from a custom format.
Note
Make sure to call one of the create_* methods before calling anything else!
See also
-
add_point((GeometryBuilder)self, (RawPoint3)point) → int :¶ Adds a new point to the geometry.
Parameters: point (RawPoint3) – The new point. Returns: The id of the added point. Return type: integer Note
The id is a simple count starting from 0. The first call to add_point returns 0, the second returns 1 and so on.
-
add_property_null_value((GeometryBuilder)self) → None :¶ Adds a property NULL value.
-
add_property_value((GeometryBuilder)self, (str)value) → None :¶ Adds a property value.
Parameters: value (str) – The property value.
-
add_tetrahedron((GeometryBuilder)self, (IdxTetrahedron)tetrahedron) → None :¶ Adds a new tetrahedron to the geometry.
Only call this if
create_tetrahedron_net3()was used.Parameters: tetrahedron (IdxTetrahedron) – The new tetrahedron.
-
add_triangle((GeometryBuilder)self, (IdxTriangle)triangle) → None :¶ Adds a new triangle to the geometry.
Only call this if
create_triangle_net3()was used.Parameters: triangle (IdxTriangle) – The new triangle.
-
create_cell_property((GeometryBuilder)self, (str)name, (PropertyTypes)type) → None :¶ Creates a simplex property on the cell level.
Depending on the type of feature this is either on a line segment, triangle or tetrahedron.
Parameters: - name (str) – The name of the simplex property.
- type (PropertyTypes) – The type of the property.
-
create_grid((GeometryBuilder)self, (GridDescription)grid_description) → None :¶ Starts creation a geometry of type Grid.
-
create_multi_polygon3((GeometryBuilder)self) → None :¶ Starts creation a geometry of type Multipolygon3.
-
create_multiline3((GeometryBuilder)self) → None :¶ Starts creation a geometry of type Multiline3.
-
create_multipoint3((GeometryBuilder)self) → None :¶ Starts creation a geometry of type Multipoint3.
-
create_tetrahedron_net3((GeometryBuilder)self) → None :¶ Starts creation a geometry of type Multipolygon3.
-
create_tin3((GeometryBuilder)self) → None :¶ Starts creation a geometry of type Tin3.
-
create_triangle_net3((GeometryBuilder)self) → None :¶ Starts creation a geometry of type Tin3.
-
create_vertex_property((GeometryBuilder)self, (str)name, (PropertyTypes)type) → None :¶ Creates a simplex property on the vertex level.
Parameters: - name (str) – The name of the simplex property.
- type (PropertyTypes) – The type of the property.
-
new_simplex((GeometryBuilder)self) → None :¶ Signals a new simplex.
This function should be invoked every time a simplex is finished. Thus, depending on geoType, a line, triangle or tetrahedron is created with the last 2,3,4 indices of the last added points. For a point set nothing will be done here.
This function has no effect for:
-
set_color((GeometryBuilder)self, (Color)color) → None :¶ Sets the color of this feature.
Parameters: color (Color) – The color of this feature.
-
set_custom_property((GeometryBuilder)self, (str)name, (str)value) → None :¶ Sets an object property of this feature.
Parameters: - name (str) – The name of the property.
- value (str) – The value of the property.
-
set_name((GeometryBuilder)self, (str)name) → None :¶ Sets the name of this feature.
Parameters: name (str) – The name of this feature.
-
set_srs((GeometryBuilder)self, (SRS)srs) → None :¶ Sets the SRS of this feature.
Parameters: srs (SRS) – The SRS of this feature.
-
set_transparency((GeometryBuilder)self, (float)transparency) → None :¶ Sets the transparency of this feature.
Parameters: transparency (float) – The transparency of this feature (range: 0. .. 1.).
-