Table of Contents

The Open Plant Scene (ops) format

12.3.2015-fc Ops files may now contain polylines and polygons (optional)
26.2.2015-fc The ops files now accept opf, gwa, but also .lig, .obj (friendly types, quick outline rendering) and any other files + an optional Terrain line
17.2.2014-fc The ops files contain .opf AND/OR .gwa files
24.1.2011-sg,fc The ops contains ONLY references to opf files
21.1.2011-sg,fc opfs → About ops, generalization to (i) other files than opf ; (ii) scenarios and projects saving (scene is static OR along time)
4.1.2011-sg,jd,fc This is an attempt to define a standard format for a scene containing plants (originaly opf files)

A need for a scene standard format

Xplo works at the individual plant level on ArchiTrees (in memory) and generates opf files as a standard. These files contain the plant topology AND geometry. Each node of the plant may carry any attributes.

AMAPstudio also proposes tools to generate Geometry With Attributes (gwa), i.e. objects the user can add in a vegetal scenes. These objects are merely geometries, they are managed in ArchiTrees and can be given attributes the same way than the plants.

Simeo works on vegetal scenes. It can be used to build scenes interactively and tends to handle the opf files from Xplo as a standard. This document proposes a standard format for a scene made of .opf and .gwa files, to set their locations and possible rotations.

EDIT February 2015 The Simeo editor (aka Edito) is now able to handle any types of files. The AMAPstudio .opf and .gwa are the most complete ones (topology + geometry) and are preferred. A degraded support for .lig (former AMAP format) and .obj (standard wavefront geometry file) has been added: these friendly files are incomplete (no topology). They can be added in the scene, they are rendered as outlines and can be exported in ops files (with location and rotations). Other files (any other file extension) are managed the same way, but are represented by a blue pin in the scene, they are also exported in .ops files.

The format is extended to temporal scenarios (scenes at several dates) and projects (several scenarios). The ops file format is a standard exchange format between Xplo and Simeo. It may also become a standard for communication with other tools.

The ops scene format

The ops scene format is a file with an extension .ops. The main format is as follows (see also optional parts in this document).

# Part 1: one line per element (.opf or .gwa file) in the scene
# Note: scale is always 1
sceneId elementId elementFileName x y z scale inclinationAzimut inclinationAngle elementTwist

# Part 2 (optional), chaining: only if scenario or project, one line per sceneId in part1
motherId sceneId date

Terrain (optional)

A line can be added before Part 1 to set the terrain properties. This line is optional.

Format for a flat terrain:

# T xOrigin yOrigin zOrigin xSize ySize flat
T 0 0 0 105 105 flat

Format for a Terrain with a simple slope (slope azimut is a trigonometric angle: same 0, counterclockwise, but in degrees:

# T xOrigin yOrigin zOrigin xSize ySize slope[slopeAzimut(ccw,deg);slopeElevation(deg)]
T 0 0 0 105 105 slope[45;12]

Format for a Terrain with a height map file (.png file; path relative to the ops directory):

# T xOrigin yOrigin zOrigin xSize ySize heightMap[zMin;zMax;heightMapPngFileName]
T 0 0 0 105 105 heightMap[60;96;opf/Prades_Mnt.png]

Part 1

NOTE for opf files: inclinationAzimut, inclinationAngle and elementTwist are applied only on the opf geometry. The attributes of the opf are not changed (sg, fc, 20.1.2011)

<html><center>The plant rotations</center></html>

Part 2 (optional)

This part concerns the chaining of the scenes. These lines may be omitted in the following cases:

For more complex projects with many scenarios, this simple format makes it possible to save the project to an ops.

Lines (optional)

If lines (i.e. polylines or polygons) are found in the original scene, they are exported in the ops file.

Format: the line records contain 3 columns separated by tabs.

The z value of each point is 0 if there is no terrain record. Else, the z value is given by the terrain (slope, height map).

Example:

# [Optional] Lines
# r,g,b color is optional, BLACK if missing
# Lines starting with a L are opened polylines
# Lines starting with a P are closed polygons
#sceneId	P/L[:r,g,b]	x,y,x,y...
1	P:128,128,128	77.092,14.943,88.986,39.912,62.019,42.689,52.728,22.446
1	L:0,0,0	41.937,29.868,59.675,29.425,78.003,30.36,97.257,38.218,103.637,44.779

Polygons and polylines

Upgrading lig files (and additional files) into single opf files

It would be interesting to have a lig2opf tool to transform the legacy AMAP lig files added in an Edito Scene with all their related files (smb, dta, brc, arc…) into single standard opf files.

This could be an on-demand tool, like Tools > Convert .lig to .opf