2 Copyright (C) 2015-2016 EDF
4 This file is part of SALOME HYDRO module.
6 SALOME HYDRO module is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 SALOME HYDRO module is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with SALOME HYDRO module. If not, see <http://www.gnu.org/licenses/>.
19 #############################################################
20 Interpretation of the SinusX format: historic (for old files)
21 #############################################################
23 File structure and line types
24 =============================
25 The ASCII file is structured in data blocks.
27 The lines that start with *B* are block limiters.
29 The lines starting with *CN* or *CP* complete the block definition.
31 The other lines starting with *C* are comments.
33 The lines that start with numbers are the block pointers.
35 It is possible to describe scatter plots, xyz curves, profiles and isocontours.
37 Depending on the format, the curves may or may not be connected and may be closed or open.
38 In practice, a curve that is not connected is a type of scatter plot...
39 The SALOME HYDRO module takes into account xyz points, curves in the XOY plane (z=0)
40 and curves in the XOZ plane (profiles).
41 Three types of processing can be used to handle curves in space (any Z, variable or not)
42 during import in the HYDRO module:
44 * Projection at z=0 to have a connected curve in the XOY plane.
45 * Creation of a line in the XOZ plane (curvilinear abscissa for the XOY curve, altitude).
46 * Import of x,y,z points that are not connected as Bathymetry/altimetry
48 The first import is the most important and should be done systematically.
50 The second is useful for xyz curves, where Z is variable.
52 The third is not easy to use directly in the HYDRO module, beyond the simple visualisation
53 of the Bathymetry/altimetry point fields in 3D. The contour of the Bathymetry/altimetry
54 field in the XOY plane is needed for the nodal interpolation of the altitude; however,
55 it makes no real linear sense. On the other, a Bathymetry/altimetry can be
56 reconstituted by combining the points of several lines (for example, a series of isocontours)
57 in a single point cloud.
64 B type x1 y1 z1 dx dy dz scale
69 * type = S scatterplot
71 * type = P xyz profile
74 x1 y1 z1 dx dy dz scale
75 -------------------------
77 Origin and deltas for conversion of measurements to metres in the table to be digitized.
79 This is ignored on import
81 examples of B-type lines
82 ------------------------
86 B S +4.290000E+05 +2.420000E+05 +0.000000E+00 +1.500000E+03 +2.000000E+03 +1.000
87 B N +0.000000E+00 +0.000000E+00 +0.000000E+00 +1.000000E+00 +1.000000E+00 +1.000000E+00 1
88 B C +0.000000E+00 +0.000000E+00 +0.000000E+00 +1.000000E+00 +1.000000E+00 +1.000000E+00 1
89 B C +0.000000E+00 +0.000000E+00 +0.000000E+00 +3.200000E+04 +2.400000E+04 +1.000
90 B C -3.333333E+03 +4.875000E+04 +0.000 A000E+00 +3.333330E+02 +1.666670E+02 +1.000000E+00 0.659154
91 B C -3.333330E+03 +4.875000E+04 +0.000 A000E+00 +3.333330E+02 +1.666670E+02 +1.000000E+00 0.658869
98 B type 0.0 0.0 0.0 1.0 1.0 1.0 1.0
116 Replace spaces by an underscore ‘_’ (example: curve 1 -> curve_1)
121 Names of the objects in the HYDRO module. Avoid the use of spaces and accented characters in the names.
126 Historical definition
127 ---------------------
133 Two booleans indicate whether the curve is closed or not and whether the points are connected
135 *example*: CP 0 1: open curve, linked points.
137 In practice, there should be no need for unconnected points, except for the scatter plots
139 Interpretation proposition and export
140 -------------------------------------
146 Two booleans indicate whether the curve is closed and whether it is the spline or broken-line type.
147 The existing data sets for the closed curves and the polygons have to be corrected manually.
156 The plane number is entered as 0, 1 or 2 (0: XOY plane, 1: YOZ plane, 2: XOZ plane).
158 Most data blocks are in the XOY plane: CP 0
160 Plane numbers 1 or 2 serve to define profiles / sections in a normal plane to the hydraulic axis,
161 with two useful coordinates. In practice, plane 2 will be used systematically.
163 Additional block-type related parameters
164 ========================================
176 CP (16 real indicators)
178 Not used – not interpreted on import.
180 Either a compatible export is made:
184 CP 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
186 Or nothing is input here: preferable.
191 Historical definition
192 ~~~~~~~~~~~~~~~~~~~~~
200 Proposed interpretation for a profile in the *XOZ* plan
201 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
202 In practice, this is a profile in the vertical plane with the georeferenced
203 positions of the two extremities given. It is assumed that the third coordinate of the points is 0.
207 CP Xorig Yorig Xend Yend
209 (Xorig, Yorig) and (Xend, Yend) are the georeferenced positions of the profile endpoints.
211 We go from a point (x, z) to the georeferenced point (ref +x*dx, yref +x*dy, z), with (dx, dy)
212 the normalized horizontal vector calculated from the two georeferenced end-points.
214 Proposed interpretation for a profile in the XOY plan
215 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
216 The points are assumed to be already georeferenced, each with three valid coordinates.
218 Several profiles can be grouped together in SALOME HYDRO to create a river object ('stream').
227 Altitude of the isocontour. This is the Z-coordinate value of each point.
229 Import: take this value as reference, ignoring the Z coordinate of individual points (FIXME: always the same value in the examples?)
240 Export information that needs to be defined can be put in the file header, for example:
242 C SALOME HYDRO version xxx
244 C name of the SALOME study
263 A label associated with the point: not used, ignore
267 For isocontours, the Z value can be ignored, as it is defined at block level.
269 When two consecutive points have the same coordinates (which may occur with
270 some data sets), the second point should be ignored.
274 Depending on the nature of the curves, the unnecessary coordinate is set to zero.
275 Note: imported isocontours are converted to curves in the Z=0 plane and grouped together in scatter
276 plots. The isocontour information is lost in SALOME and it is not possible to export them as isocontours with the altitude entered.
278 For curves projected in the XOY plane::
282 For curves projected in the XOZ plane::
286 For the XOY georeferenced profiles::
293 This is actually an isocontour with Z=9.0, though not defined as such.
300 B C -3.333330E+03 +4.875000E+04 +0.000000E+00 +3.333330E+02 +1.666670E+02 +1.000000E+00 0.658992
303 CP +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00
306 211563.340 133489.165 9.000 A
307 211604.013 133517.519 9.000 A
308 211645.047 133544.734 9.000 A
309 211684.597 133585.430 9.000 A
310 211716.859 133584.277 9.000 A
311 211777.488 133597.853 9.000 A
312 211828.211 133609.896 9.000 A
313 211896.886 133618.448 9.000 A
314 211945.422 133633.990 9.000 A
315 211996.891 133649.326 9.000 A
316 212044.447 133622.576 9.000 A
317 212067.681 133584.157 9.000 A
318 212056.937 133521.369 9.000 A
319 212007.716 133482.464 9.000 A
320 211959.462 133428.999 9.000 A
321 211925.576 133392.362 9.000 A
322 211885.762 133376.207 9.000 A
323 211817.310 133404.427 9.000 A
324 211783.848 133416.811 9.000 A
325 211742.545 133413.025 9.000 A
326 211681.493 133421.775 9.000 A
327 211644.814 133436.616 9.000 A
328 211597.633 133447.736 9.000 A
329 211569.826 133461.954 9.000 A
333 block type C (xyz curve), digitization parameters ignored
336 block name = island_shore_line
345 plan XoY (ça doit toujours être le plan 0)
348 the comments are ignored
350 ``211563.340 133489.165 9.000 A``
351 x, y, z point data. The additional information is ignored.
353 If all the Z values of the block are zero, they are ignored.
354 If at least one Z coordinate of the block has a non-zero value, then
355 the points supply a scatter plot containing the data points of the different file curves.
359 A curve projected in the XOY plane in the form of an isocontour at Z = 0.
360 It is a closed, spline curve.
370 211563.340 133489.165 0.000
371 211604.013 133517.519 0.000
372 211645.047 133544.734 0.000
373 211684.597 133585.430 0.000
374 211716.859 133584.277 0.000
375 211777.488 133597.853 0.000
376 211828.211 133609.896 0.000
377 211896.886 133618.448 0.000
378 211945.422 133633.990 0.000
379 211996.891 133649.326 0.000
380 212044.447 133622.576 0.000
381 212067.681 133584.157 0.000
382 212056.937 133521.369 0.000
383 212007.716 133482.464 0.000
384 211959.462 133428.999 0.000
385 211925.576 133392.362 0.000
386 211885.762 133376.207 0.000
387 211817.310 133404.427 0.000
388 211783.848 133416.811 0.000
389 211742.545 133413.025 0.000
390 211681.493 133421.775 0.000
391 211644.814 133436.616 0.000
392 211597.633 133447.736 0.000
393 211569.826 133461.954 0.000
399 Using the data from the example above, the curve type is changed: B N instead of B C
400 and the altitude is indicated in the header: CP 9.0.
407 B N -3.333330E+03 +4.875000E+04 +0.000000E+00 +3.333330E+02 +1.666670E+02 +1.000000E+00 0.658992
413 211563.340 133489.165 9.000 A
414 211604.013 133517.519 9.000 A
415 211645.047 133544.734 9.000 A
416 211684.597 133585.430 9.000 A
417 211716.859 133584.277 9.000 A
418 211777.488 133597.853 9.000 A
419 211828.211 133609.896 9.000 A
420 211896.886 133618.448 9.000 A
421 211945.422 133633.990 9.000 A
422 211996.891 133649.326 9.000 A
423 212044.447 133622.576 9.000 A
424 212067.681 133584.157 9.000 A
425 212056.937 133521.369 9.000 A
426 212007.716 133482.464 9.000 A
427 211959.462 133428.999 9.000 A
428 211925.576 133392.362 9.000 A
429 211885.762 133376.207 9.000 A
430 211817.310 133404.427 9.000 A
431 211783.848 133416.811 9.000 A
432 211742.545 133413.025 9.000 A
433 211681.493 133421.775 9.000 A
434 211644.814 133436.616 9.000 A
435 211597.633 133447.736 9.000 A
436 211569.826 133461.954 9.000 A
440 block type N (isocontour), digitization parameters ignored
443 block name = island_shore_line
455 the comments are ignored
457 ``211563.340 133489.165 9.000 A``
458 x, y, z point data. The additional information is ignored.
460 The Z point values are ignored. The scatter plots are supplied with the
461 curve points, with z forced to 9.0.
466 A curve, projected in the XOY plane in the form of a curve at Z = 0.
467 It is a closed, spline curve.
477 211563.340 133489.165 0.000
478 211604.013 133517.519 0.000
479 211645.047 133544.734 0.000
480 211684.597 133585.430 0.000
481 211716.859 133584.277 0.000
482 211777.488 133597.853 0.000
483 211828.211 133609.896 0.000
484 211896.886 133618.448 0.000
485 211945.422 133633.990 0.000
486 211996.891 133649.326 0.000
487 212044.447 133622.576 0.000
488 212067.681 133584.157 0.000
489 212056.937 133521.369 0.000
490 212007.716 133482.464 0.000
491 211959.462 133428.999 0.000
492 211925.576 133392.362 0.000
493 211885.762 133376.207 0.000
494 211817.310 133404.427 0.000
495 211783.848 133416.811 0.000
496 211742.545 133413.025 0.000
497 211681.493 133421.775 0.000
498 211644.814 133436.616 0.000
499 211597.633 133447.736 0.000
500 211569.826 133461.954 0.000
502 Curve projected in the XOZ plane along the curvilinear abscissa.
503 This is an open, spline-type curve, defined by convention in the XOZ plane.
508 CN altitude_island_shore_line
517 *The ends are not georeferenced; they are defined with respect to another XOY curve.*
518 To distinguish the XOZ profiles that are not georeferenced from those that
519 are (by endpoints), a specific value with null coordinates is used for the CP field::
523 The x values of the curvilinear abscissae are expressed in metres along
524 the curve or normalized between 0 and 1. **To be reviewed**.
529 In the SALOME HYDRO module, when existing SinusX files are imported:
531 - scatter plots are imported as Bathymetries.
532 - isocontours are converted to curves at Z=0 and non-georeferenced profiles
533 profiles in the XOZ plane (curvilinear abscissa, z).
534 - XYZ curves are converted to curves at Z=0 and profiles that are not
535 georeferenced in the XOZ plane (curvilinear abscissa, z).
536 - XOZ profiles georeferenced by endpoint coordinates are converted into
537 profiles whose points are all defined by their X, Y, Z coordinates (XOY profiles).
538 - XOZ profiles that are not georeferenced are imported as is (used as a line
539 of altitude for another line in the XOY plane or as a section for a channel, embankment, etc.)
540 - the XOY profiles are kept as such (all points are defined by their respective
541 X, Y, Z coordinates).
542 - All the point data of the isocontours (with non-zero Z values) and xyz
543 curves are used to create a Bathymetry field.
547 - the polylines are exported as zero-level isocontours, open or closed, spline
548 or broken line. (What is done with the sections? Use a beginning of section comment on the point?)
549 - the profiles are exported as such (to be developed)
550 - Should bathymetries be exported in SinusX format or in xyz format?
551 (only differs by the presence of a header line)
552 - Dans le module HYDRO de SALOME, lors de l'importation des fichiers SinusX existant,
557 :ref:`ref_formatsSpecs`