code: private PointSequence createPointSequence(double[][] coordinates, CrsId crsId) {
          if (coordinates == null) {
              return null;
          } else if (coordinates.length == 0) {
              return PointCollectionFactory.createEmpty();
          }
  
          DimensionalFlag df = coordinates[0].length == 4 ? DimensionalFlag.d3DM  : coordinates[0].length == 3 ? DimensionalFlag.d3D : DimensionalFlag.d2D;
          PointSequenceBuilder psb = PointSequenceBuilders.variableSized(df, crsId);
          for (double[] point : coordinates) {
              psb.add(point);
          }
          return psb.toPointSequence();
      }
docs: Helpermethod that creates a geolatte pointsequence starting from an array containing coordinate arrays
  
  @param coordinates an array containing coordinate arrays
  @return a geolatte pointsequence or null if the coordinatesequence was null