model.csv
Inspect CSV columns and configure their import.
2 functions / 7 types
Index
| Function | Description |
|---|---|
| Inspect | Inspects a CSV file and proposes a column configuration. |
| InspectString | Inspects CSV text and proposes a column configuration. |
| Type | Description |
|---|---|
| AttributeType | The roles an attribute can have, one arm per role, so measurement semantics exist only on the role that is read under them. |
| HeaderConfig | How one CSV column becomes a model attribute. |
| HeaderConfigMap | How each CSV column becomes a model attribute, keyed by column name. |
| Inspect | Inspects a CSV file and proposes a column configuration. |
| InspectString | Inspects CSV text and proposes a column configuration. |
| RealMeasurementKind | How a numeric attribute relates to the size of the thing it describes. |
| UnitConversion | Converts an imported column’s values to the units the model uses. |
Inspect
RPC
Inspect(request: model.csv.Inspect) -> model.csv.HeaderConfigMapInspects a CSV file and proposes a column configuration.
Service method: spatialengine.v1.model.csv.ModelCsv.Inspect.
Returns model.csv.HeaderConfigMap.
path : string
Path to the CSV
InspectString
RPC
InspectString(request: model.csv.InspectString) -> model.csv.HeaderConfigMapInspects CSV text and proposes a column configuration.
Service method: spatialengine.v1.model.csv.ModelCsv.InspectString.
Returns model.csv.HeaderConfigMap.
csv : string
CSV content. Only the header row plus the first few data rows are inspected.
AttributeType
Message
The roles an attribute can have, one arm per role, so measurement semantics exist only on the role that is read under them.
Choose one of: x, y, z, dx, dy, dz, real, string, rgb, int, normal, bool.
x optional : google.protobuf.Empty
X position column.
y optional : google.protobuf.Empty
Y position column.
z optional : google.protobuf.Empty
Z position column.
dx optional : google.protobuf.Empty
Block extent along the X axis.
dy optional : google.protobuf.Empty
Block extent along the Y axis.
dz optional : google.protobuf.Empty
Block extent along the Z axis.
real optional : model.csv.RealMeasurementKind
A floating-point attribute, with the measurement semantics it is read under.
string optional : google.protobuf.Empty
A string attribute.
rgb optional : google.protobuf.Empty
An RGB color attribute.
int optional : google.protobuf.Empty
An integer attribute.
normal optional : google.protobuf.Empty
A normal vector attribute.
bool optional : google.protobuf.Empty
A boolean attribute.
HeaderConfig
Message
How one CSV column becomes a model attribute.
kind optional : model.csv.AttributeType
The attribute role this column maps to.
rename optional : string
Override for the attribute’s name. When absent, the source name is kept.
unit_conversion optional : model.csv.UnitConversion
Linear conversion applied to the column’s values. When absent, none is applied.
HeaderConfigMap
Message
How each CSV column becomes a model attribute, keyed by column name.
columns optional : list[model.csv.HeaderConfigMap.ColumnsEntry]
One entry per column, keyed by the column’s name in the CSV header row.
Inspect
Message
Inspects a CSV file and proposes a column configuration.
path : string
Path to the CSV
InspectString
Message
Inspects CSV text and proposes a column configuration.
csv : string
CSV content. Only the header row plus the first few data rows are inspected.
RealMeasurementKind
Enum
How a numeric attribute relates to the size of the thing it describes.
REAL_MEASUREMENT_KIND_INDEPENDENT_VALUE = 0
Value independent of the object’s geometry.
REAL_MEASUREMENT_KIND_VALUE_BY_WEIGHT = 1
Value scaling with the object’s volume and density.
REAL_MEASUREMENT_KIND_VALUE_BY_VOLUME = 2
Value scaling with the object’s volume.
REAL_MEASUREMENT_KIND_DENSITY = 3
The object’s density.
UnitConversion
Message
Converts an imported column’s values to the units the model uses.
scale : double
Multiplier applied to each source value.
offset : double
Constant added after scaling.